After setting blurDelay = 0, then click Bold and click Paste in toolbar, it will throw the error below.
Uncaught IndexSizeError: Failed to execute 'extend' on 'Selection': 1 is larger than the given node's length.
CK version:"4.4.6",revision:"08188c4"
Only in Chrome, IE and FF will be fine
jsfiddle: http://jsfiddle.net/mfine2/98rwv6Lt/
bug ticket: http://dev.ckeditor.com/ticket/13241
Javascript code.
CKEDITOR.focusManager._.blurDelay = 0;
var ck = CKEDITOR.replace( 'editor1', {
fullPage: true
});
ck.on( "blur", function( evt ){
console.log(this.getData());
});
I have checked your test case and there is error being thrown in Blink browsers only (IE and FF work fine) but you are manipulating private property http://docs.ckeditor.com/#!/api/CKEDITOR.focusManager._-property-blurDelay which is for internal use of CKEditor only.
One of the reasons we use properties like this one is get rid-of subtle differences between browsers or errors that may get thrown in certain scenarios. When you leave this property untouched there is no error and I think that sums it up. You should not manipulate editor internal properties.
The problem you encounter is probably related to : https://github.com/ryancramerdesign/ProcessWire/issues/1335
The issue is that CKEditor's getData() method fails (and produces a JS error) when called before the field is blurred, after certain conditions (like inserting an image)
It was a bug affecting chrome, opera and safari. Throwing the same JS error.
Bug FIXED since CKE v4.5.5
Still to be tested with your modification of blurDelay though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With