Ticket #8527 (closed Bug: fixed)

Opened 3 years ago

Last modified 3 years ago

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

Reported by: satya Owned by: garry.yao
Priority: Normal Milestone: CKEditor 3.6.3
Component: General Version:
Keywords: IBM IE8 IE9 Cc: damo, tmonahan

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

8527.patch (2.8 KB) - added by garry.yao 3 years ago.
8527_2.patch (1.7 KB) - added by garry.yao 3 years ago.
8527_3.patch (597 bytes) - added by garry.yao 3 years ago.

Change History

comment:1 Changed 3 years ago by j.swiderski

  • Keywords IE8 IE9 added
  • Status changed from new to confirmed

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 3 years ago by garry.yao

comment:2 Changed 3 years ago by garry.yao

  • Owner set to garry.yao
  • Status changed from confirmed to review

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 3 years ago by fredck

  • Status changed from review to review_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 3 years ago by garry.yao

comment:4 Changed 3 years ago by garry.yao

  • Status changed from review_failed to review

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

Changed 3 years ago by garry.yao

comment:5 Changed 3 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 3 years ago by fredck

  • Status changed from review to review_passed
  • Milestone set to CKEditor 3.6.3

comment:8 Changed 3 years ago by garry.yao

  • Status changed from review_passed to closed
  • Resolution set to fixed

Fixed with [7394].

comment:9 follow-up: ↓ 10 Changed 3 years ago by 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.

Please re-open the ticket.

comment:10 in reply to: ↑ 9 Changed 3 years ago by fredck

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 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy