Fixed bug #13057: htmlArea RTE sometimes deletes contents
authorStanislas Rolland <typo3@sjbr.ca>
Fri, 5 Mar 2010 01:31:15 +0000 (01:31 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Fri, 5 Mar 2010 01:31:15 +0000 (01:31 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-2@7079 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js

index b921087..d7dd5c8 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-03-04  Stanislas Rolland  <typo3@sjbr.ca>
+
+       * Fixed bug #13057: htmlArea RTE sometimes deletes contents
+
 2010-03-04  Ernesto Baschny  <ernst@cron-it.de>
 
        * Fixed bug #13554: Web>View on mount pages via backend (thanks to Georg Ringer)
index 3272ade..1217a4b 100644 (file)
@@ -1,3 +1,7 @@
+2010-03-04  Stanislas Rolland  <typo3@sjbr.ca>
+
+       * Fixed bug #13057: htmlArea RTE sometimes deletes contents
+
 2009-12-11  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug #12782: htmlArea RTE: Editing a link title or target with Firefox 3 sometimes simply unlinks the link
index 40f8893..2812a61 100644 (file)
@@ -57,6 +57,7 @@ HTMLArea = function(textarea, config) {
                this._customUndo = true;
                this.doctype = '';
                this.eventHandlers = {};
+               this.ready = false;
        }
 };
 
@@ -1187,6 +1188,7 @@ HTMLArea.generatePlugins = function(editorNumber) {
                }
        }
        editor.updateToolbar();
+       editor.ready = true;
 };
 
 /*
@@ -1220,7 +1222,9 @@ HTMLArea.removeEditorEvents = function(ev) {
                        if (editor) {
                                RTEarea[editorNumber].editor = null;
                                        // save the HTML content into the original textarea for submit, back/forward, etc.
-                               editor._textArea.value = editor.getHTML();
+                               if (editor.ready) {
+                                       editor._textArea.value = editor.getHTML();
+                               }
                                        // release undo/redo snapshots
                                window.clearInterval(editor._timerUndo);
                                editor._undoQueue = null;