fix: Tab handling (indentation and toolbar focus) #1285
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses the UX issue of using the Tab key to both indent blocks and to navigate UI elements. There are 2 things implemented here:
First, an editor option (
tabKeyboardNavigation
) has been added to disable Tab navigation for the formatting and link toolbars, as well as the file panel. Currently, these elements prevent indenting a selection of blocks while they're open and first require closing using Escape. SettingtabKeyboardNavigation
tofalse
will make Tab and Shift+Tab always indent/unindent blocks, regardless if those elements are shown.Second, the formatting and link toolbars now stay closed after indenting/unindenting, instead of re-opening each time. The file panel doesn't need changes in this regard.
Closes #1142