Fix admin menu open/close issues on some mobile devices, props adamsilverstein, fixes #27980.
Built from https://develop.svn.wordpress.org/trunk@29247 git-svn-id: http://core.svn.wordpress.org/trunk@29031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
16696e9ea8
commit
9175194785
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue