Opened 9 years ago
Closed 8 years ago
#13307 closed Bug (expired)
Uncaught IndexSizeError: Failed to execute 'extend' on 'Selection': 1... in Blink-browsers
Reported by: | Martin | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | Cc: | glen.84@… |
Description
Seemingly at random, I get this exception when calling editor.getData() in my application. The error message is identical to #12727, but I believe it is a different bug since I use neither Div Editing Area or Content Template plugin.
I haven't been able to reproduce the bug myself, but I'm using a bugtracking tool with a console recorder in the public version of my application that tells me that the error occurs quite frequently. It seems to be a Blink-only problem and has been around since 4.4.6 at least.
Screenshot and build-config attached. I'll try switching to an uncompressed version of CKEditor to see if I can get some more info from the console recorder.
Attachments (2)
Change History (10)
Changed 9 years ago by
Attachment: | build-config.js added |
---|
Changed 9 years ago by
Attachment: | console.JPG added |
---|
comment:1 Changed 9 years ago by
Status: | new → pending |
---|---|
Version: | 4.4.7 |
comment:2 Changed 9 years ago by
I've seen more this kind of errors recently - #12727, #12154, #13241. I'll check the code, maybe I'll have some ideas what may be wrong.
comment:3 Changed 9 years ago by
I have not made any modifications to the source code and I don't believe it's being caused by Chrome custom plugins. The problem first appeared after upgrading to 4.4.6, but it might just as well be a Chrome update from the same period causing the problem.
I should probably also mention that I have only seen this problem occur when using the inline editor and only when there are multiple editor instances on the same page, but most parts of my application uses multiple inline instances on the same page so this might be a coincidence as well since the problem seems to be intermittent.
comment:4 Changed 9 years ago by
We've changed the related code in 4.4.6 IIRC so it makes sense that it started happening around this version. This code is a pretty complicated and ugly workaround for a Webkit and Blink issue with selection – these engines cannot maintain selection in empty inline elements and few other cases.
I've checked the code and it's pretty straightforward in that specific place. Before getData a filling char that we use to keep selection in place is removed and after getData it is restored. The position of selection is stored as references to focus and anchor nodes and offsets in them. As long as nothing changes in the editor on getData() this should work flawlessly, because the nodes and offsets should be valid.
So, what do you do with the data? Do you change anything in the DOM immediately after getting them? Do you perhaps modify contents of the editor from which you got them?
comment:6 Changed 9 years ago by
comment:7 Changed 9 years ago by
Cc: | glen.84@… added |
---|
comment:8 Changed 8 years ago by
Resolution: | → expired |
---|---|
Status: | pending → closed |
I can't reproduce this issue in default editor and this is required condition to accept the bug.
Please either provide steps to reproduce this problem in default standalone editor or try to identify this problem in your application. This might be caused by third-party script conflicting with editor, chrome custom plugins (they are known to break JS applications), CKEditor core code modifications or CKEditor third-party scripts.
Removing them and attaching one by one (with cache cleared) should show what is causing this problem.