Make WordPress Core

Ticket #38511: 38511.11.patch

File 38511.11.patch, 871 bytes (added by azaozz, 8 years ago)
  • src/wp-includes/js/tinymce/plugins/wpview/plugin.js

     
    9393
    9494                // Replace any new markers nodes with views.
    9595                editor.on( 'setcontent', function( event ) {
    96                         if ( event.load && ! event.initial ) {
    97                                 // Make sure that the editor is focussed.
    98                                 // May refresh the content internally which resets the iframes.
    99                                 editor.focus();
     96                        if ( event.load && ! event.initial && editor.quirks.refreshContentEditable ) {
     97                                // Make sure there is a selection in Gecko browsers.
     98                                // Or it will refresh the content internally which resets the iframes.
     99                                editor.quirks.refreshContentEditable();
    100100                        }
    101101
    102102                        wp.mce.views.render();