Opened 18 years ago
Closed 18 years ago
#231 closed Bug (fixed)
Using <p><center></p> causes extra spacing in Firefox
Reported by: | Ben | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | FCKeditor 2.4.1 |
Component: | General | Version: | FCKeditor 2.4 |
Keywords: | Confirmed | Cc: |
Description
Let's say you have this code:
<p>text text text text</p> <p><center>text text</center></p> <p>text text text text</p>
Every time you save the code, it adds
<p>&nsbp;</p>
before and after the
<p><center>text text</center></p>
So if I save it 5 times, you end up with this:
<p>text text text text</p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p><center>text text</center></p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p>text text text text</p>
Removing the <center> tag fixes the problem.
Change History (3)
comment:1 Changed 18 years ago by
Keywords: | Confirmed added; center extra spacing removed |
---|---|
Summary: | Using <center> causes extra spacing in FireFox → Using <p><center></p> causes extra spacing in Firefox |
comment:3 Changed 18 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Confirmed with both IE6 and FF2.
The thing is that this is the correct behavior (in part)! The provided code is invalid because both <p> and <center> are "block" elements. This is the job done by the browsers when parsing "<p><center>text text</center></p>":
As <center> is an old HTML3 tag, not used by FCKeditor, it has been missed at our code. I'll be fixing it, so the following code, will be ok when pasting in the source:
And this will be the only fix we can, and should, apply.