Make WordPress Core

Ticket #27971: 27971.patch

File 27971.patch, 973 bytes (added by iseulde, 11 years ago)
  • src/wp-includes/js/mce-view.js

     
    417417                                this.shortcode = options.shortcode;
    418418                                _.bindAll( this, 'setPlayer', 'pausePlayers' );
    419419                                $( this ).on( 'ready', this.setPlayer );
    420                                 $( 'body' ).on( 'click', '.wp-switch-editor', this.pausePlayers );
     420                                $( this ).on( 'ready', function( event, editor ) {
     421                                        editor.on( 'hide', this.pausePlayers );
     422                                } );
    421423                                $( document ).on( 'media:edit', this.pausePlayers );
    422424                        },
    423425
     
    558560                                this.attachments = [];
    559561                                this.shortcode = options.shortcode;
    560562
    561                                 $( 'body' ).on( 'click', '.wp-switch-editor', this.pausePlayers );
     563                                $( this ).on( 'ready', function( event, editor ) {
     564                                        editor.on( 'hide', this.pausePlayers );
     565                                } );
    562566                                $( document ).on( 'media:edit', this.pausePlayers );
    563567
    564568                                this.fetch();