Make WordPress Core

Ticket #3040: autosave-fixups.diff

File autosave-fixups.diff, 1.4 KB (added by masquerade, 20 years ago)
  • autosave.js.php

     
    8383        if ( typeof tinyMCE == "undefined" || tinyMCE.configs.length < 1 ) {
    8484                autosaveAjax.setVar("content", form.content.value);
    8585        } else {
     86                if(tinyMCE.selectedInstance.spellcheckerOn) return;
    8687                tinyMCE.wpTriggerSave();
    8788                autosaveAjax.setVar("content", form.content.value);
    8889        }
  • tinymce/plugins/wordpress/editor_plugin.js

     
    424424        }
    425425
    426426        tinyMCE._customCleanup(this, "submit_content_dom", this.contentWindow.document.body);
    427         var htm = skip_cleanup ? this.getBody().innerHTML : tinyMCE._cleanupHTML(this, this.getDoc(), this.settings, this.getBody(), tinyMCE.visualAid, true, true);
     427        tinyMCE.selectedInstance.getWin().oldfocus=tinyMCE.selectedInstance.getWin().focus;
     428        tinyMCE.selectedInstance.getWin().focus=function() {};
     429        var htm = tinyMCE._cleanupHTML(this, this.getDoc(), this.settings, this.getBody(), tinyMCE.visualAid, true, true);
     430        tinyMCE.selectedInstance.getWin().focus=tinyMCE.selectedInstance.getWin().oldfocus;
    428431        htm = tinyMCE._customCleanup(this, "submit_content", htm);
    429432
    430433        if (!skip_callback && tinyMCE.settings['save_callback'] != "")