Error CKEditor, Uncaught IndexSizeError: Failed to execute 'extend' to 'Selection': 1 greater than the specified node length

After setting blurDelay = 0, click "Bold" and click "Paste" on the toolbar, this will lead to an error.

Uncaught IndexSizeError: Failed to execute 'extend' in 'Selection': 1 greater than the specified node length.

CK Version: "4.4.6", Version: "08188c4"

Only in Chrome, IE and FF will be fine

jsfiddle: http://jsfiddle.net/mfine2/98rwv6Lt/

Error: 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()); }); 
+5
source share
2 answers

I checked your test case and there are errors in Blink browsers (IE and FF work fine) , but you manage the private property http://docs.ckeditor.com/#!/api/CKEDITOR.focusManager._-property-blurDelay , which is intended for internal use only by CKEditor .

One of the reasons we use properties such as this is to get rid of subtle differences between browsers or errors that may occur in certain scenarios. When you leave this property untouched, there is no mistake , and I think that sums it up. You should not manipulate the internal properties of the editor.

+1
source

The problem you are facing is probably related to: https://github.com/ryancramerdesign/ProcessWire/issues/1335

The problem is that the CKEditor getData () method fails (and throws a JS error) when called before blurring the field after certain conditions (for example, inserting an image)

It was a mistake affecting chrome, opera and safari. Throwing the same JS error.
FIXED error with CKE v4.5.5

However, you need to test your blurDelay modification.

+1
source

All Articles