Ticket #166 (new Bug)

Opened 21 months ago

Last modified 18 months ago

Viewing Source can change the order of elements in IE

Reported by: Martin@… Owned by:
Priority: Normal Milestone: CKEditor 3.0
Component: General Version: FCKeditor 2.4
Keywords: IE Confirmed Cc:

Description

Use the following source and toggle "View Source". On the first occasion the bottom item leaps to the top. Subsequent attempts to view source give a javascript error.

<p><span class="Normal"> <p>Line 1</p> </span><span class="Code">Line 2<br /> Line 3 <p>&nbsp;</p> </span></p> <div align="center">Line 4</div> <p>&nbsp;</p>

Change History

Changed 21 months ago by fredck

  • keywords Confirmed added; view source position changed removed
  • version set to FCKeditor 2.4

The problem is that the provided code is messed up, with block elements inside each other. IE tries to parse it an then a chaos happen in its (buggy) DOM tree.

Firefox does a better job in this sense, leaving it messed up as before.

I don't believe a fix for it could be provided anytime soon. We must work instead, to avoid FCKeditor producing code like the above. If a user instead throws invalid code in the source, then it is normal to have unexpected results. In those cases it is better to disable the source view at all.

Changed 18 months ago by fredck

  • milestone set to FCKeditor 3.0

We've been thinking about creating a text parser which generates the source view, based on the editing area innerHTML, which would also make a code cleanup. We are not yet sure we'll be really creating it, but if we go that way, that code could be useful to try to provide a fix for this ticket too (fixing the source when switching back).

Note: See TracTickets for help on using tickets.