Opened 11 years ago

Last modified 11 years ago

#11384 closed Bug

[IE&Inline] IndexSizeError thrown when pasting into non empty selection anchored in one text node — at Version 1

Reported by: Piotrek Koszuliński Owned by:
Priority: Normal Milestone: CKEditor 4.4.2
Component: General Version: 4.0
Keywords: IE Cc:

Description (last modified by Piotrek Koszuliński)

Open any inline editor. Make a selection which starts and ends in the same text node. Paste something.

User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.3; Trident/7.0; .NET4.0E; .NET4.0C)
Timestamp: Fri, 10 Jan 2014 01:17:53 UTC


Message: IndexSizeError
Line: 1950
Char: 8
Code: 0
URI: http://dragonus/cksource/ckeditor-dev/core/selection.js


Message: IndexSizeError
Line: 1950
Char: 8
Code: 0
URI: http://dragonus/cksource/ckeditor-dev/core/selection.js

First bad commit is git:ae72e45c, but in my opinion the bug is in bookmark creation for selection. After span is inserted range's end offset is not updated, so when text node is split by the first span, the end offset becomes incorrect.

However, the question is whether selection should be still used after bookmarks were made for it.

Anyway, the code that starts the problem is in clipboard: https://github.com/ckeditor/ckeditor-dev/blob/master/plugins/clipboard/plugin.js#L672 and the problem is that selection which is locked when focusing pastebin still contains outdated ranges.

The selection is then unlocked here https://github.com/ckeditor/ckeditor-dev/blob/master/plugins/clipboard/plugin.js#L795 so perhaps the easiest solution is to block selection restoring or even block selection locking even earlier.

Related tickets

  • #10787 (its test was ignored because of this bug).

Change History (1)

comment:1 Changed 11 years ago by Piotrek Koszuliński

Description: modified (diff)
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy