WordPress.org

Make WordPress Core

Changeset 29247


Ignore:
Timestamp:
07/19/2014 06:54:50 PM (7 years ago)
Author:
azaozz
Message:

Fix admin menu open/close issues on some mobile devices, props adamsilverstein, fixes #27980.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/common.js

    r29086 r29247  
    611611    window.wpResponsive = {
    612612        init: function() {
    613             var self = this,
    614                 scrollStart = 0;
     613            var self = this;
    615614
    616615            // Modify functionality based on custom activate/deactivate event
     
    636635
    637636            // Add menu events
    638             $adminmenu.on( 'touchstart.wp-responsive', 'li.wp-has-submenu > a', function() {
    639                 scrollStart = $window.scrollTop();
    640             }).on( 'touchend.wp-responsive click.wp-responsive', 'li.wp-has-submenu > a', function( event ) {
    641                 if ( ! $adminmenu.data('wp-responsive') ||
    642                     ( event.type === 'touchend' && $window.scrollTop() !== scrollStart ) ) {
    643 
     637            $adminmenu.on( 'click.wp-responsive', 'li.wp-has-submenu > a', function( event ) {
     638                if ( ! $adminmenu.data('wp-responsive') ) {
    644639                    return;
    645640                }
Note: See TracChangeset for help on using the changeset viewer.