Opened 17 years ago
Closed 17 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: |
Description
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 /> </p> <ul>
<li>bbbbbbbbbbb</li>
</ul> <p>cccccccc</p>
Tested on FCK demo (ver. 2.5 Beta Build 16848)
Change History (4)
comment:1 Changed 17 years ago by
Keywords: | Confirmed IE added; Bulleted list removed |
---|
comment:2 Changed 17 years ago by
Owner: | set to Martin Kou |
---|---|
Status: | new → assigned |
comment:3 Changed 17 years ago by
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:
<p> aaaaaa<br /> b|bbbbb<br /> cccccc </p>
With the | character denoting the caret position.
Now let's run the following code:
r = new FCKDomRange(FCK.EditorWindow); r.MoveToSelection(); i = new FCKDomRangeIterator(r); i.ForceBrBreak = true; // this flag is used in list creation i.GetNextParagraph();
The expected behavior of the above code block is that middle line gets split out into an independent paragraph:
<p>aaaaaa</p> <p>bbbbbb</p> <p>cccccc</p>
But what happened with the current code is this:
<p>aaaaaa<br /></p> <p>bbbbbb</p> <p>cccccc</p>
There's an extra <br /> in the first paragraph which shouldn't be there.
comment:4 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed with [1090].
Click here for more info about our SVN system.
Confirmed with IE. Works well with FF.