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:
Andrew Ozz 2014-07-19 18:55:16 +00:00
parent 16696e9ea8
commit 9175194785
2 changed files with 4 additions and 9 deletions

View File

@ -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