Opened 12 years ago

Closed 10 years ago

#166 closed Bug (fixed)

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 (3)

comment:1 Changed 12 years ago by Frederico Caldeira Knabben

Keywords: Confirmed added; view source position changed removed
Version: 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.

comment:2 Changed 12 years ago by Frederico Caldeira Knabben

Milestone: 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).

comment:3 Changed 10 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: newclosed

A fix for it has been introduced with #3003.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy