Ticket #30637: 30637.diff
| File 30637.diff, 970 bytes (added by , 12 years ago) |
|---|
-
src/wp-includes/js/admin-bar.js
41 41 var mobileEvent = /Mobile\/.+Safari/.test(navigator.userAgent) ? 'touchstart' : 'click'; 42 42 // close any open drop-downs when the click/touch is not on the toolbar 43 43 $(document.body).on( mobileEvent+'.wp-mobile-hover', function(e) { 44 if ( !$(e.target).closest('#wpadminbar').length ) 45 adminbar.find('li.menupop.hover').removeClass('hover'); 44 if ( !$( e.target ).closest( '#wpadminbar' ).length ) { 45 adminbar.find( 'li.menupop.hover' ).removeClass( 'hover' ); 46 } else { 47 var item = $( e.target ).closest( '.ab-item' ); 48 if ( item.length && item.parent( '.menupop' ).length ) { 49 adminbar.find( 'li.menupop.hover' ).removeClass( 'hover' ); 50 e.preventDefault(); 51 } 52 } 46 53 }); 47 54 }; 48 55