Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Cmd [arrow] commands do not function as expected #5805
In macOS, ⌘ [arrow] commands have well-defined meanings, in a text-editing context.
In Gutenberg, these commands inconsistently navigate your caret between blocks.
macOS default behavior.
Should a single block (e.g. a paragraph) define an arrow-behavior context? Currently, a single paragraph in Gutenberg is equivalent to a textarea and communicated as such to assistive technologies. Thus, I'd expect arrow commands to work within a single block.
Or, should the whole post be the context for the arrows commands?
Somewhat related: #4004
I don't think this was ever explicitly implemented in WritingFlow, so what we're seeing ends up being a combination of native behaviour (e.g. jumping to the start or end of a block's text field) with editor behaviour (navigating between blocks when the caret sits at a block boundary).
It could be implemented, but this would be a new task, not a fix.
I tested using the demo post with WordPress 4.9.8 and Gutenberg 4.3 using Firefox 63.0.1, Chrome 70.0.3538.77, and Safari 12.0 on macOS 10.13.6 and found the following to be generally true.
When the caret is not at a block boundary:
If the caret is sitting at a block boundary:
Assuming block boundaries are defined as:
This is what I found after auditing the demo post which contains the following blocks: