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 Jakub Ś)

To reproduce:

  1. Go to enterkey.html sample
  2. Set enter mode to DIV or BR using dropdown list
  3. Click New Page button to remove contents
  4. 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 Jakub Ś

Description: modified (diff)
Status: newconfirmed

comment:2 Changed 12 years ago by Garry Yao

Milestone: CKEditor 4.0

comment:3 Changed 12 years ago by Garry Yao

Component: GeneralCore : Selection
Owner: set to Garry Yao
Status: confirmedreview

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:

1. Load editor in enterMode BR
1. Click on "New Page";
1. Click outside of the editor, then use TAB key to move focus back.

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.

comment:4 Changed 12 years ago by Piotrek Koszuliński

Status: reviewreview_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?

Last edited 12 years ago by Piotrek Koszuliński (previous) (diff)

comment:5 Changed 12 years ago by Garry Yao

Status: review_failedreview

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 Piotrek Koszuliński

Status: reviewreview_failed

I see no difference on IE8 between master and t/9474b.

comment:7 Changed 12 years ago by Garry Yao

Status: review_failedreview

It turns out t/9474b doesn't really help with the issue, opened t/9474c for review.

comment:8 Changed 12 years ago by Piotrek Koszuliński

Status: reviewreview_passed

comment:9 Changed 12 years ago by Garry Yao

Resolution: fixed
Status: review_passedclosed

comment:10 Changed 12 years ago by Piotrek Koszuliński

Resolution: fixed
Status: closedreopened

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 Jakub Ś

Status: reopenedconfirmed

comment:13 Changed 12 years ago by Garry Yao

Status: confirmedreview

Re-created t/9474 for review.

comment:14 Changed 12 years ago by Piotrek Koszuliński

Status: reviewreview_passed

comment:15 Changed 12 years ago by Garry Yao

Resolution: fixed
Status: review_passedclosed

Fixed on master with:

https://github.com/ckeditor/ckeditor-dev/commit/10272e460ab1d46883af985dc55099e241ef61a6

Check github commit for clarifications.

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