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

Up/down keyboard navigation jumps horizontally #44753

Open
mcsf opened this issue Oct 6, 2022 · 7 comments
Open

Up/down keyboard navigation jumps horizontally #44753

mcsf opened this issue Oct 6, 2022 · 7 comments
Labels
Browser Issues Issues or PRs that are related to browser specific problems [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... [Type] Bug An existing feature does not function as intended

Comments

@mcsf
Copy link
Contributor

mcsf commented Oct 6, 2022

See also: #53416 #44055

Description

Step-by-step reproduction instructions

The horizontal caret position is not properly preserved across paragraph jumps. All three browsers behave differently. See the attached videos, in which I place the caret at the end of the last paragraph and then just press Up repeatedly.

Chrome seems to be the best-behaved browser so far:

caret-chrome.mov

Firefox gets it almost right, but then note the jump to "placeat" and then to "maxime":

caret-firefox.mov

Safari is all over the place, seemingly always setting the caret's horizontal component to match the end of the curernt paragraph:

caret-safari.mov

Screenshots, screen recording, code snippet

No response

Environment info

Gutenberg trunk, etc.

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@mcsf mcsf added [Type] Bug An existing feature does not function as intended Browser Issues Issues or PRs that are related to browser specific problems [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... labels Oct 6, 2022
@ellatrix
Copy link
Member

ellatrix commented Aug 4, 2023

@mcsf Could you create separate issues for these? :)

@ellatrix
Copy link
Member

ellatrix commented Aug 4, 2023

I don't think there's anything we can do here, except for using the wrapper contenteditable trick. Safari gives us a wrong range for document.caretRangeFromPoint( x, y ), so 🤷‍♀️

@mcsf mcsf changed the title Up/down keyboard navigation jumps horizontally, occasionally gets stuck Up/down keyboard navigation jumps horizontally Aug 8, 2023
@mcsf
Copy link
Contributor Author

mcsf commented Aug 8, 2023

@mcsf Could you create separate issues for these? :)

Done: I extracted the second issue Into #53416 and kept the first one here.

@bph
Copy link
Contributor

bph commented Sep 15, 2023

@mcsf I am getting confused. Could you please verify if this issue was solved with?

If not, what's the likelihood this issue is tackled for the upcoming 6.4 release?

@mcsf
Copy link
Contributor Author

mcsf commented Sep 18, 2023

Could you please verify if this issue was solved with?

No, the issue is still present. #53454 wasn't really concerned with it.

If not, what's the likelihood this issue is tackled for the upcoming 6.4 release?

As Ella says, fixing this requires reimplementing caret movement with the contentEditable trick. Considering all the little things we'd like to get in 6.4, I would say it's more likely that this issue will not be fixed by then.

@bph
Copy link
Contributor

bph commented Sep 18, 2023

Thank you so much @mcsf - I moved this issue to the Punt to 6.5 column on the WordPress 6.4 board.

@annezazu
Copy link
Contributor

annezazu commented Feb 8, 2024

After a review by core editor triage leads and core editor tech leads, this has been removed from the board for 6.5 consideration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Browser Issues Issues or PRs that are related to browser specific problems [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... [Type] Bug An existing feature does not function as intended
Projects
No open projects
Status: Punted to 6.5
Development

No branches or pull requests

4 participants