-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Writing Flow: Caret position not always preserved in vertical traversal #15604
Comments
The result of some initial debugging: The underlying cause of the issue is that we set gutenberg/packages/block-editor/src/components/writing-flow/index.js Lines 284 to 288 in 449c254
This has been the behavior since its original introduction in #2988. I expect this regressed as an indirect result of #13697 (change), specifically that gutenberg/packages/block-editor/src/components/rich-text/index.js Lines 769 to 770 in 449c254
Since gutenberg/packages/block-editor/src/components/writing-flow/index.js Lines 272 to 276 in 449c254
When the next vertical traversal occurs then, it uses the old, inaccurate
Proposed solution: It's not clear to me that we even need Based on the cc @ellatrix |
Describe the bug
When vertically navigating between paragraphs using ArrowUp, ArrowDown, the caret does not always land where would be expected to preserve its horizontal position.
It seems to be impacted by the field "remembering" where the caret was when last focused, rather than where it should be.
To reproduce
Steps to reproduce the behavior:
Expected behavior
The caret should be placed at roughly equivalent horizontal offset as where it originated from in the first paragraph (i.e. at the start of the paragraph).
Screenshots
Desktop:
The text was updated successfully, but these errors were encountered: