Fixed bug #9965: htmlArea RTE: IE jumps down to last RTE input
authorStanislas Rolland <typo3@sjbr.ca>
Thu, 22 Jan 2009 02:41:05 +0000 (02:41 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Thu, 22 Jan 2009 02:41:05 +0000 (02:41 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@4815 709f56b5-9817-0410-a4d7-c38de5d9e867

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

index 80813cd..bef65d4 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,8 @@
 
        * Follow-up to #10195: htmlArea RTE: Update RTE about info
        * Added feature #10219: htmlArea RTE: Clean up unused localization files
-       * Fixed bug #9785: Disabling images in RTE still leaves the toolbar button
+       * Fixed bug #9785: htmlArea RTE: Disabling images in RTE still leaves the toolbar button
+       * Fixed bug #9965: htmlArea RTE: IE jumps down to last RTE input
 
 2009-01-20  Stanislas Rolland  <typo3@sjbr.ca>
 
index 58ec3aa..52e1e04 100644 (file)
@@ -2,7 +2,8 @@
 
        * Follow-up to #10195: htmlArea RTE: Update RTE about info
        * Added feature #10219: htmlArea RTE: Clean up unused localization files
-       * Fixed bug #9785: Disabling images in RTE still leaves the toolbar button
+       * Fixed bug #9785: htmlArea RTE: Disabling images in RTE still leaves the toolbar button
+       * Fixed bug #9965: htmlArea RTE: IE jumps down to last RTE input
 
 2009-01-20  Stanislas Rolland  <typo3@sjbr.ca>
 
index 7d13473..eab1b2e 100644 (file)
@@ -1096,7 +1096,6 @@ HTMLArea.prototype.stylesLoaded = function() {
                        if (this._doc.queryCommandEnabled("insertbronreturn")) this._doc.execCommand("insertbronreturn", false, this.config.disableEnterParagraphs);
                        if (this._doc.queryCommandEnabled("styleWithCSS")) this._doc.execCommand("styleWithCSS", false, this.config.useCSS);
                }
-               if (HTMLArea.is_ie) doc.selection.empty();
                this._editMode = "wysiwyg";
                if (doc.body.contentEditable || doc.designMode == "on") HTMLArea._appendToLog("[HTMLArea::initIframe]: Design mode successfully set.");
        } else {
@@ -1146,9 +1145,19 @@ HTMLArea.generatePlugins = function(editorNumber) {
                editor.onGenerate = null;
        }
        HTMLArea._appendToLog("[HTMLArea::initIframe]: All plugins successfully generated.");
-               // size the iframe
+               // Size the iframe
        editor.sizeIframe(2);
-       editor.focusEditor();
+               // Focus on the first editor instance
+       for (var editorId in RTEarea) {
+               if (RTEarea.hasOwnProperty(editorId)) {
+                       if (RTEarea[editorId].editor) {
+                               if (editorNumber == editorId) {
+                                       editor.focusEditor();
+                               }
+                               break;
+                       }
+               }
+       }
        editor.updateToolbar();
 };
 
@@ -1481,8 +1490,6 @@ HTMLArea.prototype.focusEditor = function() {
                        try {
                                if (HTMLArea.is_safari) {
                                        this._iframe.focus();
-                               } else if (HTMLArea.is_opera) {
-                                       this._doc.focus();
                                } else {
                                        this._iframe.contentWindow.focus();
                                }