-
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
Show toolbar on meta key press #873
Conversation
@youknowriad How do we best move focus to the toolbar in React? |
@iseulde There's no special React feature for this, you'll have to store the ref and call |
So, to clarify, the goal of this PR is to ignore the toolbars entirely in the focus order (atm this is inconsistent in master), so the focus goes straight from block content to content. The meta shortcut (and probably the current editor shortcut in wp-admin) should show the toolbar and move the focus to the first item, and then you can use tabbing as usual to go over the buttons. Esc to move focus back. |
This sounds right according to my reading of #297. |
} | ||
|
||
handleKeyUp() { | ||
if ( this.metaCount === 1 ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a bit odd to expect, but if I hold down a non-meta character (say, c
), then press a meta character, when releasing, metaCount
is === 1
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for testing! 👍
#2960 took this over. |
Start for #552. Ideally the focus would also move to the first button of the toolbar.