[wp-trac] [WordPress Trac] #27980: Admin menu open/close issue on mobile devices

WordPress Trac noreply at wordpress.org
Tue Apr 22 20:52:04 UTC 2014


#27980: Admin menu open/close issue on mobile devices
--------------------------------------------+-----------------------------
 Reporter:  bilalcoder                      |      Owner:
     Type:  defect (bug)                    |     Status:  new
 Priority:  normal                          |  Milestone:  Awaiting Review
Component:  Menus                           |    Version:  3.9
 Severity:  normal                          |   Keywords:
  Focuses:  ui, javascript, administration  |
--------------------------------------------+-----------------------------
 Clicking on admin menu items opens and closes the menu on both android and
 iphone devices,

 at wp-admin/js/common.js (line 609) both 'touchend' and 'click' events are
 fired when clicking the menu.
 {{{
 $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 ) ) {

                 return;
         }

         $( this ).parent( 'li' ).toggleClass( 'selected' );
         event.preventDefault();
 });
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27980>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list