X-Git-Url: https://scripts.mit.edu/gitweb/autoinstallsdev/wordpress.git/blobdiff_plain/bd54ad7dcd1cbf3b37f7822f71ca57b742f00a77..b925718b4bf2dd47a8429f844d0a255ca6e35bd1:/wp-includes/js/media-views.js diff --git a/wp-includes/js/media-views.js b/wp-includes/js/media-views.js index 0e1ea805..60f9b936 100644 --- a/wp-includes/js/media-views.js +++ b/wp-includes/js/media-views.js @@ -462,14 +462,14 @@ EditImage = wp.media.controller.State.extend({ * @since 3.9.0 */ activate: function() { - this.listenTo( this.frame, 'toolbar:render:edit-image', this.toolbar ); + this.frame.on( 'toolbar:render:edit-image', _.bind( this.toolbar, this ) ); }, /** * @since 3.9.0 */ deactivate: function() { - this.stopListening( this.frame ); + this.frame.off( 'toolbar:render:edit-image' ); }, /** @@ -4085,8 +4085,8 @@ AttachmentsBrowser = View.extend({ }); // Add keydown listener to the instance of the Attachments view - this.attachments.listenTo( this.controller, 'attachment:keydown:arrow', this.attachments.arrowEvent ); - this.attachments.listenTo( this.controller, 'attachment:details:shift-tab', this.attachments.restoreFocus ); + this.controller.on( 'attachment:keydown:arrow', _.bind( this.attachments.arrowEvent, this.attachments ) ); + this.controller.on( 'attachment:details:shift-tab', _.bind( this.attachments.restoreFocus, this.attachments ) ); this.views.add( this.attachments );