Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#8527 closed Bug (fixed)

IE: Trying to insert a table after inserting an anchor generating error

Reported by: Satya Minnekanti Owned by: Garry Yao
Priority: Normal Milestone: CKEditor 3.6.3
Component: General Version:
Keywords: IBM IE8 IE9 Cc: Damian, Teresa Monahan

Description

To reproduce the defect:

  1. Open replace by class sample and clear the content by clicking on new page button.
  1. Insert an anchor using Anchor dialog.
  1. Now open Table dialog and click OK button to insert a table.

Expected Result: Table dialog closed and table inserted before the anchor.

Actual Result: Table dialog not closed but a table inserted and it replaces the anchor. when you look at status bar we are seeing an error and the error is " 'type' is null or not an object"

Attachments (3)

8527.patch (2.8 KB) - added by Garry Yao 12 years ago.
8527_2.patch (1.7 KB) - added by Garry Yao 12 years ago.
8527_3.patch (597 bytes) - added by Garry Yao 12 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 12 years ago by Jakub Ś

Keywords: IE8 IE9 added
Status: newconfirmed

Issue has only been reproducible in IE8 and Ie9 from CKEditor 3.6 rev [6904]

The JS error is:
Message: 'type' is null or not an object
Line: 1530
URI:/3.6.2/ckeditor/_source/core/dom/range.js

Changed 12 years ago by Garry Yao

Attachment: 8527.patch added

comment:2 Changed 12 years ago by Garry Yao

Owner: set to Garry Yao
Status: confirmedreview

Although we proposed in IE using real link element to present empty anchor while it turns out to bring certain annoying problems to editing and selection in general, so it looks like the best for us is still to fake anchor in IE.

comment:3 Changed 12 years ago by Frederico Caldeira Knabben

Status: reviewreview_failed

If I recall it well, there are reasons for doing that on IE (well, that's for sure). It is much probably related to the way things are rendered in IE:

  • IE9: The following HTML will now render badly aligned (empty anchor forces the line height):
<p>
	Line<br />
	Line<br />
	This is a <a name="a"></a><a name="b">test</a> to check the alignment. Line<br />
	Line Line</p>

Additional, these issues were also noticed:

  • I9+Compat / IE6 : The Anchor options are not available on context menu for empty anchors.
  • IE6 : The following will not show as anchor when moving back from Source view:
<p><a name="test">Some text</a></p>

Changed 12 years ago by Garry Yao

Attachment: 8527_2.patch added

comment:4 Changed 12 years ago by Garry Yao

Status: review_failedreview

It looks like the selection issue can be workaround with force a layout on the anchor, just like we did in IE8.

Changed 12 years ago by Garry Yao

Attachment: 8527_3.patch added

comment:5 Changed 12 years ago by Garry Yao

I just found that FF suffers from the same issue too, and it turns out it's more of our own code that breaks it, we can safely fix it by not allowing the selection to move inside of an empty anchor.

comment:7 Changed 12 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.6.3
Status: reviewreview_passed

comment:8 Changed 12 years ago by Garry Yao

Resolution: fixed
Status: review_passedclosed

Fixed with [7394].

comment:9 Changed 12 years ago by Satya Minnekanti

Issue not properly fixed. Table dialog closes but it's replacing existing anchor where as the expected behavior is Table dialog closes & table inserted before the anchor and this is what happening in all other browsers except IE.

Please re-open the ticket.

comment:10 in reply to:  9 Changed 12 years ago by Frederico Caldeira Knabben

Replying to satya:

Issue not properly fixed. Table dialog closes but it's replacing existing anchor where as the expected behavior is Table dialog closes & table inserted before the anchor and this is what happening in all other browsers except IE.

Actually, you can notice that the anchor gets selected after insertion. Because of this, the current behavior is correct in IE, having the anchor replaced by the table.

Please re-open the ticket.

This is a different issue, which is not any more related to a js error.

If you feel that this behavior should be aligned among browsers, please open a dedicated ticket for it.

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