Media: Move Attachments view preventDefault handler to the events object. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22651 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
930790f78c
commit
646c90861f
@ -2204,7 +2204,8 @@
|
|||||||
'change [data-setting] input': 'updateSetting',
|
'change [data-setting] input': 'updateSetting',
|
||||||
'change [data-setting] select': 'updateSetting',
|
'change [data-setting] select': 'updateSetting',
|
||||||
'change [data-setting] textarea': 'updateSetting',
|
'change [data-setting] textarea': 'updateSetting',
|
||||||
'click .close': 'removeFromLibrary'
|
'click .close': 'removeFromLibrary',
|
||||||
|
'click a': 'preventDefault'
|
||||||
},
|
},
|
||||||
|
|
||||||
buttons: {},
|
buttons: {},
|
||||||
@ -2220,14 +2221,10 @@
|
|||||||
// Update the model's details view.
|
// Update the model's details view.
|
||||||
this.model.on( 'selection:single selection:unsingle', this.details, this );
|
this.model.on( 'selection:single selection:unsingle', this.details, this );
|
||||||
this.details( this.model, this.controller.state().get('selection') );
|
this.details( this.model, this.controller.state().get('selection') );
|
||||||
|
|
||||||
// Prevent default navigation on all links.
|
|
||||||
this.$el.on( 'click', 'a', this.preventDefault );
|
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy: function() {
|
destroy: function() {
|
||||||
this.model.off( null, null, this );
|
this.model.off( null, null, this );
|
||||||
this.$el.off( 'click', 'a', this.preventDefault );
|
|
||||||
this.remove();
|
this.remove();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user