[wp-trac] [WordPress Trac] #49431: Media uploader window leaves behind orphan button element in Block Editor

WordPress Trac noreply at wordpress.org
Fri Feb 14 08:29:09 UTC 2020


#49431: Media uploader window leaves behind orphan button element in Block Editor
--------------------------+------------------------------
 Reporter:  talldanwp     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Media         |     Version:  5.0
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  javascript
--------------------------+------------------------------

Comment (by afercia):

 This is an example of the core implementation, where:
 - the media uploader is initialized only when clicking on the "choose from
 library" button
 - it returns if the media frame already exist

 https://core.trac.wordpress.org/browser/trunk/src/js/_enqueues/admin
 /custom-background.js?rev=43347&marks=86-143#L79

 Instead, I guess gutenberg initializes the uploader each time a media-
 related block is inserted (and does that twice?).

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


More information about the wp-trac mailing list