If the cleaner is enabled the editor looses focus after every keystroke, this only happens in Chrome. I looked into the code and found out the reason is the following:
$(iframeDocument).bind('input paste',function(e) {
// After timeout, paste is effective
window.setTimeout(function() {
var contentAfterPaste = editor._process(body.html(), settings);
body.html(contentAfterPaste);
}, 0);
});
If the function is only bound to 'paste' it start working again. I'm sure the 'input' part is there for a reason but I haven't found it yet?
After I changed the code to the following it seems to work in all major browsers:
$(iframeDocument).bind('paste',function(e) {
// After timeout, paste is effective
window.setTimeout(function() {
var contentAfterPaste = editor._process(body.html(), settings);
body.html(contentAfterPaste);
}, 0);
});
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | wysiwyg_cleaner_chromefix.patch | 469 bytes | boreg |
Comments
Comment #1
jstollerI experienced this problem as well and am trying the above workaround, but I'd like to know if this is going to break anything else.
Comment #2
boreg commentedSame problem here, also in latest dev version. I tried your solution and it works. Didnt found any problems yet. Please provide it as a patch. Thanx
Comment #3
boreg commentedhere is the patch reflecting markwittens changes
Comment #4
jide commented@markwittens and @boreg : Thanks, I can't see any reason why I did this. I'll commit this soon.