[wp-trac] [WordPress Trac] #39859: wp.media.view.Modal jumps when you open it

WordPress Trac noreply at wordpress.org
Tue Jan 23 22:03:56 UTC 2018


#39859: wp.media.view.Modal jumps when you open it
-----------------------------+----------------------------------------
 Reporter:  andreiglingeanu  |       Owner:  afercia
     Type:  defect (bug)     |      Status:  assigned
 Priority:  normal           |   Milestone:  4.9.3
Component:  Media            |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |     Focuses:  accessibility, javascript
-----------------------------+----------------------------------------

Comment (by adamsilverstein):

 @afercia in my testing focusing `this.$el` seemed to work, without causing
 any scrolling?

 if that is still causing the scrolling, I think the approach with find is
 better (`this.$el.find( '.media-modal' ).focus(); `) - I'm concerned that
 `this.$( '.media-modal' )` might not find the right modal if two were open
 at the same time? I think `this.$el` refers to the specific modal instance
 that is being opened, while `this.$` refers to the (global) jQuery object.

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


More information about the wp-trac mailing list