#54030 closed defect (bug) (fixed)
Pressing esc in Widgets Editor closes panel in customizer
Reported by: | gwwar | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.8.1 | Priority: | normal |
Severity: | normal | Version: | 5.8 |
Component: | Customize | Keywords: | has-patch fixed-major |
Focuses: | Cc: |
Description
When editing a widget in /wp-admin/customize.php?return=%2Fwp-admin%2Fwidgets.php using the widget block editor, try pressing "esc". The customizer panel is closed regardless of if the block editor has focus or not.
Attachments (1)
Change History (10)
This ticket was mentioned in PR #1630 on WordPress/wordpress-develop by gwwar.
3 years ago
#1
- Keywords has-patch added
#2
@
3 years ago
- Milestone changed from Awaiting Review to 5.9
- Version changed from trunk to 5.8
Thanks for the ticket and patch, @gwwar!
Both the Additional CSS code editor and the pre-block, TinyMCE-powered Text widget seem to also intercept the Escape key as described in the PR. So, while I don't have the background to comment on the specifics of the Pull Request, conceptually the idea makes sense to me at first glance.
#3
@
3 years ago
I suppose this could also be eligible for 5.8.1 if there was interest in picking it up sooner.
#4
@
3 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 51682:
Note: See
TracTickets for help on using
tickets.
Fixes https://core.trac.wordpress.org/ticket/54030
When editing a widget in /wp-admin/customize.php?return=%2Fwp-admin%2Fwidgets.php using the widget block editor, try pressing "esc". The customizer panel is closed regardless of if the block editor has focus or not.
Instead of having the block editor stop propagation of key events, let's make the customizer aware of block editor instances and avoid firing keyboard shortcuts if an editor instance has focus.
#### Before
https://user-images.githubusercontent.com/1270189/131191958-30bd5984-d5ba-4b61-a67d-a02534f3026a.mp4
#### After
https://user-images.githubusercontent.com/1270189/131191962-cd5f54c1-04fe-4867-b810-c94e223733d6.mp4
### Testing Instructions