[wp-trac] [WordPress Trac] #53765: Media Library shows only the selected image
WordPress Trac
noreply at wordpress.org
Thu Dec 16 18:28:06 UTC 2021
#53765: Media Library shows only the selected image
--------------------------+-------------------------
Reporter: benitolopez | Owner: (none)
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 5.9
Component: Media | Version: 5.8
Severity: normal | Resolution:
Keywords: has-patch | Focuses: javascript
--------------------------+-------------------------
Comment (by szaqal21):
@hellofromTonya yes, previously updateSelection() was called strict in
activate() of ReplaceImage controller, now it is called on event and
handler is being removed is deactivate() this is why deactivate() is
needed (same approach as in FeaturedImage activate() and deactivate()):
{{{
/**
* @since 3.5.0
*/
activate: function() {
this.frame.on( 'open', this.updateSelection, this );
Library.prototype.activate.apply( this, arguments );
},
/**
* @since 3.5.0
*/
deactivate: function() {
this.frame.off( 'open', this.updateSelection, this );
Library.prototype.deactivate.apply( this, arguments );
},
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53765#comment:69>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list