From 19e61fb14fab5a3fdf7af2aa27b8fce6d7f5a05e Mon Sep 17 00:00:00 2001 From: Tonya Mork Date: Mon, 17 Jan 2022 19:53:32 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@52591 602fd350-edb4-49c9-b593-d223f7449a82 --- src/js/_enqueues/admin/common.js | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/js/_enqueues/admin/common.js b/src/js/_enqueues/admin/common.js index f105133d1c..5e15893d1f 100644 --- a/src/js/_enqueues/admin/common.js +++ b/src/js/_enqueues/admin/common.js @@ -1695,25 +1695,6 @@ $( function() { } } ); - // Close sidebar when focus moves outside of toggle and sidebar. - $( '#wp-admin-bar-menu-toggle, #adminmenumain' ).on( 'focusout', function() { - var focusIsInToggle, focusIsInSidebar; - - if ( ! $wpwrap.hasClass( 'wp-responsive-open' ) ) { - return; - } - - // A brief delay is required to allow focus to switch to another element. - setTimeout( function() { - focusIsInToggle = $.contains( $( '#wp-admin-bar-menu-toggle' )[0], $( ':focus' )[0] ); - focusIsInSidebar = $.contains( $( '#adminmenumain' )[0], $( ':focus' )[0] ); - - if ( ! focusIsInToggle && ! focusIsInSidebar ) { - $( '#wp-admin-bar-menu-toggle' ).trigger( 'click.wp-responsive' ); - } - }, 10 ); - } ); - // Add menu events. $adminmenu.on( 'click.wp-responsive', 'li.wp-has-submenu > a', function( event ) { if ( ! $adminmenu.data('wp-responsive') ) {