mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-05 15:16:59 +00:00
Toolbar: Allow submenus to be closed with a second tap on touch devices.
Also closes submenus when the admin menu is toggled open, as it opens below and thus can be obscured. props stephdau, seanchayes. see #29906. git-svn-id: https://develop.svn.wordpress.org/trunk@33056 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -920,6 +920,10 @@ li#wp-admin-bar-menu-toggle {
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before {
|
||||
color: #00b9eb;
|
||||
}
|
||||
}
|
||||
|
||||
/* Smartphone */
|
||||
|
||||
@@ -752,6 +752,10 @@ $(document).ready( function() {
|
||||
// Toggle sidebar when toggle is clicked
|
||||
$( '#wp-admin-bar-menu-toggle' ).on( 'click.wp-responsive', function( event ) {
|
||||
event.preventDefault();
|
||||
|
||||
// close any open toolbar submenus
|
||||
$adminbar.find( '.hover' ).removeClass( 'hover' );
|
||||
|
||||
$wpwrap.toggleClass( 'wp-responsive-open' );
|
||||
if ( $wpwrap.hasClass( 'wp-responsive-open' ) ) {
|
||||
$(this).find('a').attr( 'aria-expanded', 'true' );
|
||||
|
||||
Reference in New Issue
Block a user