WordPress.org

Make WordPress Core

Changeset 51682


Ignore:
Timestamp:
08/28/2021 01:24:13 AM (4 weeks ago)
Author:
SergeyBiryukov
Message:

Customize: Prevent collapsing expanded panel/section/control when Esc is pressed on a block editor instance.

This ensures that the current panel is not collapsed when hitting Esc with the focus on the widget block editor.

Follow-up to [37347], [39120].

Props gwwar, dlh.
Fixes #54030.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/wp/customize/controls.js

    r51677 r51682  
    84628462            }
    84638463
     8464            // Abort if we're inside of a block editor instance.
     8465            if ( event.target.closest( '.block-editor-writing-flow' ) !== null
     8466                || event.target.closest( '.block-editor-block-list__block-popover' ) !== null
     8467            ) {
     8468                return;
     8469            }
     8470
    84648471            // Check for expanded expandable controls (e.g. widgets and nav menus items), sections, and panels.
    84658472            api.control.each( function( control ) {
Note: See TracChangeset for help on using the changeset viewer.