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:
Scott Taylor 2014-06-20 16:30:16 +00:00
parent 22e5b6932a
commit 0abf8699f3
2 changed files with 7 additions and 3 deletions

View File

@ -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