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
Improve moving focus back from the toolbars to the blocks, see `focusSelection()` #5840
Noticed while testing the "navigation/edit mode" PR #5709.
The formatting toolbar implements a keyboard-friendly feature: when focus is on the toolbar and the Escape key is pressed, focus is moved back to the selection (or insertion point) in the editable text of the block. See in
This works pretty well for editable blocks and focus is moved back to the previous selection or caret position.
However, I'd like to propose a few improvements:
pressing Escape from the inline toolbar does nothing. Also in this case, focus should be moved back to the selection/insertion point in the editable field. I guess
In this case, I guess a possible solution would be:
/cc @youknowriad any feedback and thoughts welcome