plandem / lwrte

Export from Google Code. Lightweight Rich Text Editor (RTE / WYSIWYG) for jQuery
https://code.google.com/p/lwrte/
0 stars 0 forks source link

Slow response in IE #37

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Just type little faster in IE6+

What is the expected output? What do you see instead?
It takes the input with a delay of 2-3 seconds. 

What version of the product are you using? On what operating system?
lwrte 1.2 (latest) on XP/IE

Please provide any additional information below.

Original issue reported on code.google.com by vikas.pr...@gmail.com on 11 Jul 2009 at 6:27

GoogleCodeExporter commented 9 years ago
I've replaced out next part of jquery.rte.js (line 187-189). 

$(self.iframe_doc).keyup(function(event) {
    self.set_selected_controls(self.get_selected_element(), self.controls.rte); 
    });
with
    $(self.iframe_doc).keyup(function(event) { self.keyupHandler(self); 
    });

and added function 

lwRTE.prototype.keyupHandler = function(sender) {
if (sender.keyupTimer)
    clearTimeout(sender.keyupTimer);
sender.keyupTimer = setTimeout(function() {
sender.set_selected_controls(sender.get_selected_element(), 
sender.controls.rte);
    }
    ,100); 
}

ps. Function placed after:
 // Mozilla CSS styling off
    if(!$.browser.msie)
        self.editor_cmd('styleWithCSS', false);
}

Original comment by dmitrisc...@gmail.com on 24 Feb 2010 at 11:07