Description
Some commands in the block toolbar 'Options' menu open a modal dialog.
When the modal dialog is open, the expectation is that pressing the Escape key will close the dialog and retur focus back to the item in the menu that opened it.
This works for all the 'Options" menu items except the 'Create pattern' one.
Screenshot ot the block toolbar 'Options' menu items to be tested:
Step-by-step reproduction instructions
- Create a post, add a Paragraph block.
- From the block toolbar open the 'Options' menu.
- Test the following items in the menu, you can either click on them or use the keyboard to move to them and press Enter.
- Click 'Lock'. A modal dialog opens.
- Press the Escape key. The dialog closes and focus is moved back to the trigger, as expected.
- Click 'Rename'. A modal dialog opens.
- Press the Escape key. The dialog closes and focus is moved back to the trigger, as expected.
- Click 'Hide'. A modal dialog opens.
- Press the Escape key. The dialog closes and focus is moved back to the trigger, as expected.
- Click 'Create pattern'. A modal dialog opens.
- Press the Escape key. The dialog closes. Observe the Options menu closes as well. Observe there is a focus loss.
Screenshots, screen recording, code snippet
No response
Environment info
- WordPress trunk 7.1-alpha-62161-src
- Gutenberg 23.3.1 (trunk)
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
Description
Some commands in the block toolbar 'Options' menu open a modal dialog.
When the modal dialog is open, the expectation is that pressing the Escape key will close the dialog and retur focus back to the item in the menu that opened it.
This works for all the 'Options" menu items except the 'Create pattern' one.
Screenshot ot the block toolbar 'Options' menu items to be tested:
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.