[BUGFIX] JS error in IE7 while starting RTE
authorStanislas Rolland <typo3@sjbr.ca>
Wed, 10 Oct 2012 02:58:06 +0000 (22:58 -0400)
committerStanislas Rolland <typo3@sjbr.ca>
Wed, 10 Oct 2012 03:01:58 +0000 (05:01 +0200)
Fixes for issue #33637 were incorrectly backported to TYPO3 4.6.
The selection was not yet structured as an object in that release.

Change-Id: Ibe084b34bd1196d5d65c51645092d646ae6f3e8d
Resolves: #40082
Releases: 4.6
Reviewed-on: http://review.typo3.org/15470
Reviewed-by: Stanislas Rolland
Tested-by: Stanislas Rolland
typo3/sysext/rtehtmlarea/htmlarea/plugins/Language/language.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/SelectFont/select-font.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/TextIndicator/text-indicator.js

index 6bb7124..c417b25 100644 (file)
@@ -132,10 +132,10 @@ HTMLArea.Language = Ext.extend(HTMLArea.Plugin, {
                                        // Monitor the language combo's store being loaded
                                select.mon(select.getStore(), 'load', function () {
                                        this.addLanguageMarkingRules();
-                                       var selection = this.editor.getSelection(),
-                                               selectionEmpty = selection.isEmpty(),
-                                               ancestors = selection.getAllAncestors(),
-                                               endPointsInSameBlock = selection.endPointsInSameBlock();
+                                       var selection = this.editor._getSelection(),
+                                               selectionEmpty = this.editor._selectionEmpty(selection),
+                                               ancestors = this.editor.getAllAncestors(),
+                                               endPointsInSameBlock = this.editor.endPointsInSameBlock();
                                        this.onUpdateToolbar(select, this.getEditorMode(), selectionEmpty, ancestors, endPointsInSameBlock);
                                }, this);
                        }
index 2fe8ac6..44edbb3 100644 (file)
@@ -127,10 +127,10 @@ HTMLArea.SelectFont = Ext.extend(HTMLArea.Plugin, {
                        var select = this.getButton(dropDown[0]);
                        if (select) {
                                select.mon(select.getStore(), 'load', function () {
-                                       var selection = this.editor.getSelection(),
-                                               selectionEmpty = selection.isEmpty(),
-                                               ancestors = selection.getAllAncestors(),
-                                               endPointsInSameBlock = selection.endPointsInSameBlock();
+                                       var selection = this.editor._getSelection(),
+                                               selectionEmpty = this.editor._selectionEmpty(selection),
+                                               ancestors = this.editor.getAllAncestors(),
+                                               endPointsInSameBlock = this.editor.endPointsInSameBlock();
                                        this.onUpdateToolbar(select, this.getEditorMode(), selectionEmpty, ancestors, endPointsInSameBlock);
                                }, this);
                        }
index 55de114..ff13e1d 100644 (file)
@@ -80,10 +80,10 @@ HTMLArea.TextIndicator = Ext.extend(HTMLArea.Plugin, {
         */
        onCssParsingComplete: function () {
                var button = this.getButton('TextIndicator'),
-                       selection = this.editor.getSelection(),
-                       selectionEmpty = selection.isEmpty(),
-                       ancestors = selection.getAllAncestors(),
-                       endPointsInSameBlock = selection.endPointsInSameBlock();
+                       selection = this.editor._getSelection(),
+                       selectionEmpty = this.editor._selectionEmpty(selection),
+                       ancestors = this.editor.getAllAncestors(),
+                       endPointsInSameBlock = this.editor.endPointsInSameBlock();
                if (button) {
                        this.onUpdateToolbar(button, this.getEditorMode(), selectionEmpty, ancestors, endPointsInSameBlock);
                }