Changeset 29193
- Timestamp:
- 07/16/2014 07:31:30 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/mce-view.js
r29191 r29193 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 … … 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 … … 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(); 583 } 584 } 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 } 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(); 592 } 593 } 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 } 596 } 597 }); 594 598 }, 595 599
Note: See TracChangeset
for help on using the changeset viewer.