[wp-trac] [WordPress Trac] #28857: Media Grid: Manage focus when toggling between the grid and an edit attachment modal

WordPress Trac noreply at wordpress.org
Fri Jul 25 02:57:37 UTC 2014


#28857: Media Grid: Manage focus when toggling between the grid and an edit
attachment modal
---------------------------+----------------------------------------
 Reporter:  davidakennedy  |       Owner:  wonderboymusic
     Type:  defect (bug)   |      Status:  reopened
 Priority:  normal         |   Milestone:  4.0
Component:  Media          |     Version:  trunk
 Severity:  normal         |  Resolution:
 Keywords:  needs-patch    |     Focuses:  accessibility, javascript
---------------------------+----------------------------------------
Changes (by ericlewis):

 * keywords:  has-patch dev-feedback => needs-patch
 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 We should think about the implementation here more thoroughly.

 We should never use global jQuery selectors in Backbone code, this
 typically implies an object is taking on more responsibility than it can
 handle.

 The task of reestablishing focus on the correct element should probably
 live within the `media.view.MediaFrame.Manage` controller. As this
 controller opens up the modal via the `openEditAttachmentModal` method, it
 should probably also listen to events happening on that frame to keep
 track of what attachment is currently being edited/viewed in the modal,
 and on close reestablish focus appropriately.

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


More information about the wp-trac mailing list