-
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
"More options" dropdown menu stuck after removing block #14754
Comments
@aduth I wonder if this is related to the change made recently about the toggles behavior. |
I assume you mean #14456 ? It doesn't appear that it should be related, as the pull request affected specific menu options in the editor "More Options" menu, whereas this one appears to be related to block options menu. I've reproduced the issue. I assume it's likely related to how we forcibly re-insert a default block when all other blocks are removed. This re-insertion likely triggers focus to be moved to the block and out of the menu. gutenberg/packages/block-editor/src/store/actions.js Lines 404 to 406 in 9af3f42
gutenberg/packages/block-editor/src/components/block-list/block.js Lines 82 to 86 in 9af3f42
I assume that if this analysis is correct, the bug will have been present for a while. That said, the I'd suggest action items:
|
Part of the problem is also that selecting the menu items does not close the menu. I'm unsure whether it was done so intentionally, but my reading of the recommendations is that the menu should be closed. I wonder also if it's something we can improve in the abstractions and relationships between |
Closing in favor of #15313 , which is technically the duplicate as it was created later, but includes some additional useful context from the recent accessibility audit. |
Describe the bug
The "More options" menu (three dot button) in the Top Toolbar is stuck when a block is removed using the arrow keys.
Using Gutenberg 5.4.0-rc.1.
To Reproduce
Steps to reproduce the behavior:
ALT + F10
,Arrow Left
,ENTER
to open the "More options" dropdown.To confirm the issue, add any number of blocks and try these steps on a random block.
Expected behavior
The dropdown menu should close after the block is removed.
(Note: the menu also stays open when performing these steps with the mouse, but can be closed by clicking anywhere on the screen. This is only possible using the keyboard by selecting the post title, because it does not have a more options menu.)
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: