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. Built from https://develop.svn.wordpress.org/trunk@28784 git-svn-id: http://core.svn.wordpress.org/trunk@28597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
22e5b6932a
commit
0abf8699f3
|
@ -417,7 +417,9 @@ window.wp = window.wp || {};
|
|||
this.shortcode = options.shortcode;
|
||||
_.bindAll( this, 'setPlayer', 'pausePlayers' );
|
||||
$( 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 );
|
||||
},
|
||||
|
||||
|
@ -558,7 +560,9 @@ window.wp = window.wp || {};
|
|||
this.attachments = [];
|
||||
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 );
|
||||
|
||||
this.fetch();
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue