Ticket #28905: 28905.4.patch
File 28905.4.patch, 1.7 KB (added by , 11 years ago) |
---|
-
src/wp-includes/js/mce-view.js
162 162 iframeDoc.close(); 163 163 164 164 resize = function() { 165 $( iframe ).height( $( iframeDoc.body ).height() ); 165 // Make sure the iframe still exists. 166 iframe.contentWindow && $( iframe ).height( $( iframeDoc.body ).height() ); 166 167 }; 167 168 168 169 if ( MutationObserver ) { … … 515 516 $( document ).on( 'media:edit', this.pausePlayers ); 516 517 }, 517 518 518 setNode: function ( event, editor, node ) { 519 if ( node ) { 520 this.node = node; 521 } 519 setNode: function ( event, editor ) { 522 520 editor.on( 'hide', this.pausePlayers ); 523 521 524 522 if ( this.parsed ) { … … 576 574 }, 577 575 578 576 pausePlayers: function() { 579 var p, win = $( 'iframe', this.node ).get(0).contentWindow; 580 if ( win && win.mejs ) { 581 for ( p in win.mejs.players ) { 582 win.mejs.players[p].pause(); 577 this.getNodes( function( editor, node ) { 578 var p, win = $( 'iframe', node ).get(0).contentWindow; 579 580 if ( win && win.mejs ) { 581 for ( p in win.mejs.players ) { 582 win.mejs.players[p].pause(); 583 } 583 584 } 584 } 585 }); 585 586 }, 586 587 587 588 unsetPlayers: function() { 588 var p, win = $( 'iframe', this.node ).get(0).contentWindow; 589 if ( win && win.mejs ) { 590 for ( p in win.mejs.players ) { 591 win.mejs.players[p].remove(); 589 this.getNodes( function( editor, node ) { 590 var p, win = $( 'iframe', node ).get(0).contentWindow; 591 592 if ( win && win.mejs ) { 593 for ( p in win.mejs.players ) { 594 win.mejs.players[p].remove(); 595 } 592 596 } 593 } 597 }); 594 598 }, 595 599 596 600 unbind: function() {