Further adjustments after [8364], listen to an editor instance event instead of delegating a body click when attempting to pause all players belonging to a particular MCE view.
Props avryl. Fixes #27971. git-svn-id: https://develop.svn.wordpress.org/trunk@28784 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5ec545d5ab
commit
eb289835f7
@ -417,7 +417,9 @@ window.wp = window.wp || {};
|
|||||||
this.shortcode = options.shortcode;
|
this.shortcode = options.shortcode;
|
||||||
_.bindAll( this, 'setPlayer', 'pausePlayers' );
|
_.bindAll( this, 'setPlayer', 'pausePlayers' );
|
||||||
$( this ).on( 'ready', this.setPlayer );
|
$( this ).on( 'ready', this.setPlayer );
|
||||||
$( 'body' ).on( 'click', '.wp-switch-editor', this.pausePlayers );
|
$( this ).on( 'ready', function( event, editor ) {
|
||||||
|
editor.on( 'hide', this.pausePlayers );
|
||||||
|
} );
|
||||||
$( document ).on( 'media:edit', this.pausePlayers );
|
$( document ).on( 'media:edit', this.pausePlayers );
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -558,7 +560,9 @@ window.wp = window.wp || {};
|
|||||||
this.attachments = [];
|
this.attachments = [];
|
||||||
this.shortcode = options.shortcode;
|
this.shortcode = options.shortcode;
|
||||||
|
|
||||||
$( 'body' ).on( 'click', '.wp-switch-editor', this.pausePlayers );
|
$( this ).on( 'ready', function( event, editor ) {
|
||||||
|
editor.on( 'hide', this.pausePlayers );
|
||||||
|
} );
|
||||||
$( document ).on( 'media:edit', this.pausePlayers );
|
$( document ).on( 'media:edit', this.pausePlayers );
|
||||||
|
|
||||||
this.fetch();
|
this.fetch();
|
||||||
|
Loading…
Reference in New Issue
Block a user