Make WordPress Core

Changeset 52591


Ignore:
Timestamp:
01/17/2022 07:53:32 PM (2 years ago)
Author:
hellofromTonya
Message:

Administration: Revert [51946].

Reverting changeset due to reported issue of menu being hidden after clicking on certain mobile devices.

Props dhusakovic, audrasjb, SergeyBiryukov, costdev, joedolson.
See #54837, #53587.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/admin/common.js

    r52406 r52591  
    16961696            } );
    16971697
    1698             // Close sidebar when focus moves outside of toggle and sidebar.
    1699             $( '#wp-admin-bar-menu-toggle, #adminmenumain' ).on( 'focusout', function() {
    1700                 var focusIsInToggle, focusIsInSidebar;
    1701 
    1702                 if ( ! $wpwrap.hasClass( 'wp-responsive-open' ) ) {
    1703                     return;
    1704                 }
    1705 
    1706                 // A brief delay is required to allow focus to switch to another element.
    1707                 setTimeout( function() {
    1708                     focusIsInToggle  = $.contains( $( '#wp-admin-bar-menu-toggle' )[0], $( ':focus' )[0] );
    1709                     focusIsInSidebar = $.contains( $( '#adminmenumain' )[0], $( ':focus' )[0] );
    1710 
    1711                     if ( ! focusIsInToggle && ! focusIsInSidebar ) {
    1712                         $( '#wp-admin-bar-menu-toggle' ).trigger( 'click.wp-responsive' );
    1713                     }
    1714                 }, 10 );
    1715             } );
    1716 
    17171698            // Add menu events.
    17181699            $adminmenu.on( 'click.wp-responsive', 'li.wp-has-submenu > a', function( event ) {
Note: See TracChangeset for help on using the changeset viewer.