Opened 16 years ago

Closed 16 years ago

#1518 closed Bug (fixed)

Extra block added before Bulleted list

Reported by: PavelZ Owned by: Martin Kou
Priority: Normal Milestone: FCKeditor 2.5
Component: Core : Lists Version: FCKeditor 2.5 Beta
Keywords: Confirmed IE Cc:


Steps to reproduce:

In fck do: aaaaaaa <Shift+Enter> bbbbbbbbbbb <Shift+Enter> cccccccc

on the second line (with "bbbbbbb") press "bulleted list". Second line is bulleted but an empty line appears between line 1 and 2 (in IE always in FF sometimes).

The Source HTML is:

<p>aaaaaaa<br /> &nbsp;</p> <ul>


</ul> <p>cccccccc</p>

Tested on FCK demo (ver. 2.5 Beta Build 16848)

Change History (4)

comment:1 Changed 16 years ago by Frederico Caldeira Knabben

Keywords: Confirmed IE added; Bulleted list removed

Confirmed with IE. Works well with FF.

comment:2 Changed 16 years ago by Martin Kou

Owner: set to Martin Kou
Status: newassigned

comment:3 Changed 16 years ago by Martin Kou

It seems the problem originates from FCKDomRangeIterator, instead of the list command logic.

After some experiments, I found FCKDomRangeIterator isn't deleting <br> tags at the end of splitted block elements correctly. For example, say we have this:

aaaaaa<br />
b|bbbbb<br />

With the | character denoting the caret position.

Now let's run the following code:

r = new FCKDomRange(FCK.EditorWindow);
i = new FCKDomRangeIterator(r);
i.ForceBrBreak = true; // this flag is used in list creation

The expected behavior of the above code block is that middle line gets split out into an independent paragraph:


But what happened with the current code is this:

<p>aaaaaa<br /></p>

There's an extra <br /> in the first paragraph which shouldn't be there.

comment:4 Changed 16 years ago by Martin Kou

Resolution: fixed
Status: assignedclosed

Fixed with [1090].

Click here for more info about our SVN system.

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