Fix admin menu open/close issues on some mobile devices, props adamsilverstein, fixes #27980.
git-svn-id: https://develop.svn.wordpress.org/trunk@29247 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b53705fa7b
commit
9c366c8f61
|
@ -610,8 +610,7 @@ $(document).ready( function() {
|
|||
|
||||
window.wpResponsive = {
|
||||
init: function() {
|
||||
var self = this,
|
||||
scrollStart = 0;
|
||||
var self = this;
|
||||
|
||||
// Modify functionality based on custom activate/deactivate event
|
||||
$document.on( 'wp-responsive-activate.wp-responsive', function() {
|
||||
|
@ -635,12 +634,8 @@ $(document).ready( function() {
|
|||
} );
|
||||
|
||||
// Add menu events
|
||||
$adminmenu.on( 'touchstart.wp-responsive', 'li.wp-has-submenu > a', function() {
|
||||
scrollStart = $window.scrollTop();
|
||||
}).on( 'touchend.wp-responsive click.wp-responsive', 'li.wp-has-submenu > a', function( event ) {
|
||||
if ( ! $adminmenu.data('wp-responsive') ||
|
||||
( event.type === 'touchend' && $window.scrollTop() !== scrollStart ) ) {
|
||||
|
||||
$adminmenu.on( 'click.wp-responsive', 'li.wp-has-submenu > a', function( event ) {
|
||||
if ( ! $adminmenu.data('wp-responsive') ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue