Fixed bug #12684: htmlArea RTE: Repeated character / backspacing is slow in Firefox
authorStanislas Rolland <typo3@sjbr.ca>
Fri, 20 Nov 2009 17:06:27 +0000 (17:06 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Fri, 20 Nov 2009 17:06:27 +0000 (17:06 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6483 709f56b5-9817-0410-a4d7-c38de5d9e867

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

index b892804..96a09f8 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-11-20  Stanislas Rolland  <typo3@sjbr.ca>
+
+       * Fixed bug #12684: htmlArea RTE: Repeated character / backspacing is slow in Firefox
+
 2009-11-20  Christian Kuhn  <lolli@schwarzbu.ch>
 
        * Fixed bug #12676: Validation issue in sysext opendocs: Missing htmlspecialchars of href parameter
index 907fe58..8513ac1 100644 (file)
@@ -1,3 +1,7 @@
+2009-11-20  Stanislas Rolland  <typo3@sjbr.ca>
+
+       * Fixed bug #12684: htmlArea RTE: Repeated character / backspacing is slow in Firefox
+
 2009-11-19  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug #12677: htmlArea RTE: Incorrect cursor position after backspace/delete in Firefox
index aa4dc2d..d23c05d 100644 (file)
@@ -1805,6 +1805,7 @@ HTMLArea._editorEvent = function(ev) {
        }
        var editor = RTEarea[owner._editorNo]["editor"];
        var keyEvent = ((HTMLArea.is_ie || HTMLArea.is_safari) && ev.type == "keydown") || (HTMLArea.is_gecko && ev.type == "keypress");
+       var mouseEvent = (ev.type == "mousedown" || ev.type == "mouseup");
        editor.focusEditor();
 
        if(keyEvent) {
@@ -1893,7 +1894,7 @@ HTMLArea._editorEvent = function(ev) {
                                                }
                                                        // update the toolbar state after some time
                                                if (editor._timerToolbar) window.clearTimeout(editor._timerToolbar);
-                                               editor._timerToolbar = window.setTimeout("HTMLArea.updateToolbar(\'" + editor._editorNumber + "\');", 100);
+                                               editor._timerToolbar = window.setTimeout("HTMLArea.updateToolbar(\'" + editor._editorNumber + "\');", 200);
                                                return false;
                                        }
                                        break;
@@ -1904,7 +1905,7 @@ HTMLArea._editorEvent = function(ev) {
                                        }
                                                // update the toolbar state after some time
                                        if (editor._timerToolbar) window.clearTimeout(editor._timerToolbar);
-                                       editor._timerToolbar = window.setTimeout("HTMLArea.updateToolbar(\'" + editor._editorNumber + "\');", 50);
+                                       editor._timerToolbar = window.setTimeout("HTMLArea.updateToolbar(\'" + editor._editorNumber + "\');", 200);
                                        break;
                                case 9: // KEY horizontal tab
                                        var newkey = (ev.shiftKey ? "SHIFT-" : "") + "TAB";
@@ -1921,7 +1922,7 @@ HTMLArea._editorEvent = function(ev) {
                                case 40: // DOWN arrow key
                                        if (HTMLArea.is_ie || HTMLArea.is_safari) {
                                                if (editor._timerToolbar) window.clearTimeout(editor._timerToolbar);
-                                               editor._timerToolbar = window.setTimeout("HTMLArea.updateToolbar(\'" + editor._editorNumber + "\');", 10);
+                                               editor._timerToolbar = window.setTimeout("HTMLArea.updateToolbar(\'" + editor._editorNumber + "\');", 200);
                                                return true;
                                        }
                                        break;
@@ -1943,7 +1944,7 @@ HTMLArea._editorEvent = function(ev) {
                        }
                        return true;
                }
-       } else {
+       } else if (mouseEvent) {
                        // mouse event
                if (editor._timerToolbar) window.clearTimeout(editor._timerToolbar);
                if (ev.type == "mouseup") editor.updateToolbar();