Item14819: lost content on specific editor interactions

pencil
Priority: Urgent
Current State: Closed
Released In: 2.1.7
Target Release: patch
Applies To: Extension
Component: TinyMCEPlugin
Branches: Release02x01 master
Reported By: MichaelDaum
Waiting For:
Last Change By: MichaelDaum
How to reproduce:

  1. edit a topic in wysiwyg mode
  2. switch to raw mode
  3. make a change
  4. preview it
  5. switch back to wysiwyg
  6. make more changes
  7. hit save (or preview)

Step 7 won't show the changes made in step 6. The error only exists on the Release02* branch, not on master.

Please the following hot fix which seems to cure the problem as by now:

diff --git a/TinyMCEPlugin/pub/System/TinyMCEPlugin/foswiki_tiny.uncompressed.js b/TinyMCEPlugin/pub/System/TinyMCEPlugin/foswiki_tiny.uncompressed.js
index 3b46673a3..45db21b7b 100644
--- a/TinyMCEPlugin/pub/System/TinyMCEPlugin/foswiki_tiny.uncompressed.js
+++ b/TinyMCEPlugin/pub/System/TinyMCEPlugin/foswiki_tiny.uncompressed.js
@@ -289,6 +289,7 @@ var FoswikiTiny = {
             }
             editor.setContent(text);
             editor.isNotDirty = true;
+            editor.initialized = true; // Oops-err make sure the editor is enabled again
             FoswikiTiny.enableSaveButton(true);
             
             // Hide the conversion button, if it exists

-- MichaelDaum - 11 Feb 2019

 
Topic revision: r3 - 28 Mar 2022, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy