﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
11384	[IE&Inline] IndexSizeError thrown when pasting into non empty selection anchored in one text node	Piotrek Koszuliński	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)."	Bug	closed	Normal	CKEditor 4.4.2	General	4.0	fixed	IE	
