* @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' );
},
/**
});
// 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 );