Make WordPress Core

Ticket #27980: 27980.diff

File 27980.diff, 1.0 KB (added by adamsilverstein, 11 years ago)

only check for clicks in responsive admin menu - android<4.1 doesn't fire touch events properly

  • wp-admin/js/common.js

     
    581581
    582582        window.wpResponsive = {
    583583                init: function() {
    584                         var self = this,
    585                                 scrollStart = 0;
     584                        var self = this;
    586585
    587586                        // Modify functionality based on custom activate/deactivate event
    588587                        $document.on( 'wp-responsive-activate.wp-responsive', function() {
     
    606605                        } );
    607606
    608607                        // Add menu events
    609                         $adminmenu.on( 'touchstart.wp-responsive', 'li.wp-has-submenu > a', function() {
    610                                 scrollStart = $window.scrollTop();
    611                         }).on( 'touchend.wp-responsive click.wp-responsive', 'li.wp-has-submenu > a', function( event ) {
    612                                 if ( ! $adminmenu.data('wp-responsive') ||
    613                                         ( event.type === 'touchend' && $window.scrollTop() !== scrollStart ) ) {
    614 
     608                        $adminmenu.on( 'click.wp-responsive', 'li.wp-has-submenu > a', function( event ) {
     609                                if ( ! $adminmenu.data('wp-responsive') ) {
    615610                                        return;
    616611                                }
    617612