Ticket #1664 (closed Bug: fixed)
Elements swaping on Enter at the end of paragraphs
| Reported by: | fredck | Owned by: | fredck |
|---|---|---|---|
| Priority: | Normal | Milestone: | FCKeditor 2.6 |
| Component: | UI : Enter Key | Version: | |
| Keywords: | Review+ Confirmed | Cc: |
Description
Steps to Reproduce
- Load the following HTML:
<p><font size="6"><font size="1">Hit enter at the end of this line</font></font></p>
- Hit ENTER at the end of the line and type some text.
- Repeat step 2 may times, and have some fun :)
Current Results
The <font> tags changed order. After enter and "some text", this is what we have:
<p><font size="6"><font size="1">Hit enter at the end of this line</font></font></p> <p><font size="1"><font size="6">Some text</font></font></p>
Expected Results
The new paragraph must have the formatting tags in the same order:
<p><font size="6"><font size="1">Hit enter at the end of this line</font></font></p> <p><font size="6"><font size="1">Some text</font></font></p>
Attachments
Change History
comment:2 Changed 5 years ago by fredck
- Keywords Review? added
The proposed patch inverts the order the elements are created when hitting ENTER at the end of the paragraph.
comment:3 Changed 5 years ago by martinkou
The pre-patch line in fckenterkey.js...
eFocusElement = eFocusElement.appendChild( FCKDomTools.CloneElement( element ) ) ;
was doing the tree reconstruction in reverse, since the element path array goes from near to far, and the patch fixes that line. The new tree reconstruction logic in the patch seems correct both in theory and in my tests. So I'm giving it a Review+.
comment:4 Changed 5 years ago by fredck
- Keywords Review+ added; Review? removed
- Status changed from assigned to closed
- Resolution set to fixed
Based on your comment Martin, I think you forgot to flag it with Review+.
Fixed with [1219]. Click here for more info about our SVN system.
Note: See
TracTickets for help on using
tickets.
