[wp-trac] [WordPress Trac] #30348: Arrow key navigation in Media Grid skips ids

WordPress Trac noreply at wordpress.org
Sat Nov 15 09:56:31 UTC 2014


#30348: Arrow key navigation in Media Grid skips ids
--------------------------+----------------------------------------
 Reporter:  UmeshSingla   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Media         |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  accessibility, javascript
--------------------------+----------------------------------------

Comment (by UmeshSingla):

 On opening modal, this code already handles the keyDown event:
 https://core.trac.wordpress.org/browser/trunk/src/wp-includes/js/media-
 grid.js#L441
 {{{
 this.modal.on( 'open', function () {
   $( 'body' ).on( 'keydown.media-modal', _.bind( self.keyEvent, self ) );
 } );
 }}}

 And code at https://core.trac.wordpress.org/browser/trunk/src/wp-
 includes/js/media-grid.js#L391, registers the keyDown event again, which
 causes the nextMediaItem to call twice and thus skip ids.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30348#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list