Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android Cursor Issue] the cursor jump to first line,when block is bigger than viewport #5291

Open
robinsonlin0603 opened this issue Feb 10, 2023 · 4 comments

Comments

@robinsonlin0603
Copy link

Description
In Android, when block is bigger than viewport ,something strange happens where the selection is briefly incorrect and is considered to be at the beginning of the first line.

Recording

2023-02-10.11.40.00.mov

Expectation
Not auto jump to first line

Environment

Slate Version: current
Operating System: android 12 (and others)
Browser: Android kitkat (current version)
TypeScript Version: 4.9.3 (in my implementation)
Next:13.1.3

@robinsonlin0603
Copy link
Author

Hello, I find out the problem when my css setting over-flow-scroll, the problem will happen

@clauderic
Copy link
Collaborator

Try setting the scrollSelectionIntoView prop of Editable to an empty function:

function noop() {}

<Editable scrollSelectionIntoView={noop} />

@TujinLee
Copy link

Try setting the scrollSelectionIntoView prop of Editable to an empty function:

function noop() {}

<Editable scrollSelectionIntoView={noop} />

if you do that,when you click enter to insert new block content into the doc,it will not scroll into view

@smelamud
Copy link

@clauderic, thanks a lot! I was stuck into this issue for a long time, but your hint helped to workaround it.

smelamud added a commit to MoeraOrg/moera-client-react that referenced this issue Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants