Opened 12 years ago
Closed 12 years ago
#9474 closed Bug (fixed)
V4 and IE: It is not possible to insert table in enter mode other than P
Reported by: | Jakub Ś | Owned by: | Garry Yao |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.0 |
Component: | Core : Selection | Version: | 4.0 |
Keywords: | IE | Cc: |
Description (last modified by )
To reproduce:
- Go to enterkey.html sample
- Set enter mode to DIV or BR using dropdown list
- Click New Page button to remove contents
- Click Table button and press OK in table dialog.
Result JS errors pop out:
IE9
Message: CRIPT5007: can't get property type. It is null or undefined.
Line: 1469
URI: ckeditor4/code/dom/range.js
Message: SCRIPT5007: can't get property childNodes. It is null or undefined.
Line: 94
URI: ckeditor4/code/dom/text.js
IE8 and IE7
Message: Invalid argument
Line: 444
URI: ckeditor4/core/dom/node.js
Change History (15)
comment:1 Changed 12 years ago by
Description: | modified (diff) |
---|---|
Status: | new → confirmed |
comment:2 Changed 12 years ago by
Milestone: | → CKEditor 4.0 |
---|
comment:3 Changed 12 years ago by
Component: | General → Core : Selection |
---|---|
Owner: | set to Garry Yao |
Status: | confirmed → review |
comment:4 Changed 12 years ago by
Status: | review → review_failed |
---|
Error is thrown after range is selected in:
- native selectionchange,
- checkSelectionChange,
- elementPath constructor,
- getSelection().getStartElement(),
- range.optimize().
Start and end container of this range is text node which is not present in DOM (body.getFirst() === null
), so IMO this issue is caused by incorrect result of getSelection().getRanges()
. Could you check that?
comment:5 Changed 12 years ago by
Status: | review_failed → review |
---|
Some deeper investigation shows that the error is caused by the selection filler text used with a collapsed cursor, opened t/9474b for the 2nd review.
comment:6 Changed 12 years ago by
Status: | review → review_failed |
---|
I see no difference on IE8 between master and t/9474b.
comment:7 Changed 12 years ago by
Status: | review_failed → review |
---|
It turns out t/9474b doesn't really help with the issue, opened t/9474c for review.
comment:8 Changed 12 years ago by
Status: | review → review_passed |
---|
comment:9 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
comment:10 Changed 12 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Unfortunately it looks that I missed some reds this patch is introducing on IE8:
- /dt/plugins/enter/enterkey.html#test enter key scrolls document
- /dt/plugins/link/link.html#test create link
- /dt/plugins/link/link.html#test create link (with editor focus)
comment:11 Changed 12 years ago by
Status: | reopened → confirmed |
---|
comment:12 Changed 12 years ago by
comment:14 Changed 12 years ago by
Status: | review → review_passed |
---|
comment:15 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed on master with:
https://github.com/ckeditor/ckeditor-dev/commit/10272e460ab1d46883af985dc55099e241ef61a6
Check github commit for clarifications.
It's a generic selection error that occurs always when restoring the selection, but the error raised only when cursor is collapsed inside of an empty editable, an invalid range is restored from the unlock selection in the following case:
It looks like just an IE selection quirks, and I didn't find other better way to fix this issue other than catching the error thrown when trying to restore a locked selection.