Opened 11 years ago
Closed 11 years ago
#11384 closed Bug (fixed)
[IE&Inline] IndexSizeError thrown when pasting into non empty selection anchored in one text node
Reported by: | Piotrek Koszuliński | Owned by: | Piotrek Koszuliński |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.4.2 |
Component: | General | Version: | 4.0 |
Keywords: | IE | Cc: |
Description (last modified by )
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 (15)
comment:1 Changed 11 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 11 years ago by
comment:3 Changed 11 years ago by
Status: | new → confirmed |
---|
This particular issue can be reproduced from CKEditor 4.0 in IE.
There are few IndexSizeError issues: http://dev.ckeditor.com/search?q=IndexSizeError&noquickjump=1&changeset=on&milestone=on&ticket=on&wiki=on
comment:5 Changed 11 years ago by
Owner: | set to Olek Nowodziński |
---|---|
Status: | confirmed → assigned |
comment:6 Changed 11 years ago by
Milestone: | CKEditor 4.3.3 → CKEditor 4.3.4 |
---|
comment:7 Changed 11 years ago by
Milestone: | CKEditor 4.3.4 → CKEditor 4.4.1 |
---|---|
Owner: | Olek Nowodziński deleted |
Status: | assigned → confirmed |
Sad, but we again didn't have enough time for this, tricky one.
comment:8 Changed 11 years ago by
Owner: | set to Marek Lewandowski |
---|---|
Status: | confirmed → assigned |
comment:9 Changed 11 years ago by
I've pushed the test which autmoatically will generate the exception to t/11384 branch. I had no success with locating source of the issue though.
Test was added temporarily to tt dir. I guess we'd like to move it to clipboard plugin when the fix is done.
comment:10 Changed 11 years ago by
Milestone: | CKEditor 4.4.1 → CKEditor 4.4.2 |
---|---|
Owner: | changed from Marek Lewandowski to Piotrek Koszuliński |
Heh... This ticket may become new #5217. I'll give a try in 4.4.2.
comment:13 Changed 11 years ago by
Status: | assigned → review |
---|
comment:14 Changed 11 years ago by
Status: | review → review_passed |
---|
Code's ok, I've changed docs which I feel might be easier to read/get for the very first time.
comment:15 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed on master with git:4d28beb.
cc