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);
});

CommentFileSizeAuthor
#3 wysiwyg_cleaner_chromefix.patch469 bytesboreg

Comments

jstoller’s picture

I 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.

boreg’s picture

Same 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

boreg’s picture

StatusFileSize
new469 bytes

here is the patch reflecting markwittens changes

jide’s picture

Status: Needs review » Reviewed & tested by the community

@markwittens and @boreg : Thanks, I can't see any reason why I did this. I'll commit this soon.