-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Fixes focus managemnt on block selection change for fixed block toolbar #50346
Conversation
Size Change: +35 B (0%) Total Size: 1.37 MB
ℹ️ View Unchanged
|
@draganescu, do we want to maintain the I am asking because I might have an alternative fix for this. |
The problem here was that we also manually handle focus on the expand/collapse controls and that was stealing the focus away from the block when you selected a new one. If we can improve my approach I am all for it - using yet another state smells a bit like not the best way, but I haven't found a more streamlined approach. |
This works but #50497 is much cleaner and also does a good refactoring in the new block toolbar code. |
What?
Closes #50337
Why?
Because clicking on a block should keep focus on the clicked block.
How?
Adds a new state to the block toolbar that tracks block selection change. We need a new state because we need to konw that the selection changed between renders of the block toolbar inside the block contextual toolbar which is only mounted once.
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast
top-toolbar-focus-block-selection.mp4