-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Blocks: Alt+F10 should navigate to block toolbar regardless of v…
…isibility (#11607) ## Description Closes: #10907 When pressing alt + f10 if the contextual toolbar was not visible because the user was typing, we did not focus the block contextual toolbar, and we focused the header instead. This PR addresses this problem. To solve the problem, the PR performs the following actions: Adds a prop to NavigableToolbar that enables it to focus when mounting. Adds an event handler for pressing alt+f10 key combination on BlockListBlock and state flag the indicates that the handling is in progress. ## How has this been tested? I checked the unified toolbar mode was not enabled. I added a paragraph, I wrote something until the toolbar disappears I pressed alt+f10, and I verified the block toolbar appeared with the first item focused. I repeated the test with other blocks, e.g., writing on the image caption.
- Loading branch information
1 parent
52a3375
commit a2fee33
Showing
5 changed files
with
50 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If we need to rerender after changing the value of
isForcingContextualToolbar
, any reasonisForcingContextualToolbar
is not a state value?