[wp-trac] [WordPress Trac] #48021: Dismissing notice on the media library triggers error in console

WordPress Trac noreply at wordpress.org
Thu Sep 12 10:42:38 UTC 2019


#48021: Dismissing notice on the media library triggers error in console
--------------------------+-----------------------------------------
 Reporter:  desrosj       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.2.4
Component:  Media         |     Version:  5.2.3
 Severity:  minor         |  Resolution:
 Keywords:  has-patch     |     Focuses:  javascript, administration
--------------------------+-----------------------------------------
Changes (by afercia):

 * keywords:  needs-patch => has-patch
 * version:   => 5.2.3
 * milestone:  Awaiting Review => 5.2.4


Comment:

 At the moment, `wp.media.view.FocusManager` is initialized only on the
 media ''modal''.

 [attachment:"48021.diff"] seems the simpler way to fix this issue.

 Noting that on other tickets related to the media views, for example in
 #47149, I'm proposing to make the `FocusManager` a more useful tool for
 general focus management methods to be reused across all the media views.

 There are cases where focus needs to be managed also outside of the modal.
 For example in this case, when pressing the Dismiss error button, there's
 a focus loss that should be prevented. For the future, I'm considering to
 initialize `FocusManager` on the media frame so that it should be
 available everywhere.  For now, [attachment:"48021.diff"] should solves
 this specific error.

 Setting the milestone to 5.2.4 as it's a small, self-contained fix. Please
 do feel free to change it if not appropriate.

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


More information about the wp-trac mailing list