Ctrl+S adds <br> tag inside <li> tags in composer if inside div style="display: none;"

NEW
Unassigned

Status

()

Core
Editor
--
major
13 years ago
8 years ago

People

(Reporter: megan, Unassigned)

Tracking

Trunk
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.11) Gecko/20050728
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.11) Gecko/20050728

When Ctrl+S is pressed to save the document, the document saves, but also has a
bizarre feature:

If there is a tag <div style="display: none;"> in the document, and there is an
unordered list inside this tag, all of the <li> tags gain a <br> after their
contents.

i.e. My test document looks as follows:
<html>
<head>
<title></title>
</head>
<body>
<br>
<div style="display: none;">
<ul>
<li>Test</li>
</ul>
</div>
</body>
</html>

when I press Ctrl+S to save, the <LI> line turns into the following:
 <li>Test<br>
</li>

Additionally, after the </div> another <br> magically appears.

Upon each additional save (after edits) another <br> is added in the <LI> tag.
No additional <br> is added after the </div>

Reproducible: Always

Steps to Reproduce:
1. Create a new document in composer
2. Replace the auto generated code with the following:

My test document looks as follows:
<html>
<head>
<title></title>
</head>
<body>
<br>
<div style="display: none;">
<ul>
<li>Test</li>
</ul>
</div>
</body>
</html>

3. Save the document via Ctrl+S or file>save

Actual Results:  
Upon first save, in addition to saving the document, code becomes:

<html>
<head>
<title></title>
</head>
<body>
<br>
<div style="display: none;">
<ul>
<li>Test<br>
</li>
</ul>
</div>
<br>
</body>
</html>

Upon second save, document is saved and code becomes:
<html>
<head>
<title></title>
</head>
<body>
<br>
<div style="display: none;">
<ul>
<li>Test<br>
<br>
</li>
</ul>
</div>
<br>
</body>
</html>

Expected Results:  
Document should have been saved, but no additional code written into the document.

Using default theme.

Comment 1

13 years ago
Reproducible with Mozilla 1.8b1 and SeaMonkey 1.0a, just switching to Normal
View after editing the document in HTML Source View also seems to trigger this bug.

Product: Mozilla Application Suite, Component: Editor?

Comment 2

13 years ago
Sorry, I meant "Component: Composer".
Sounds like a core editor issue....  I see this in a current trunk build too.
Assignee: aaronleventhal → mozeditor
Status: UNCONFIRMED → NEW
Component: Keyboard: Navigation → Editor
Ever confirmed: true
QA Contact: keyboard.navigation

Comment 4

12 years ago
Created attachment 214579 [details]
displayed correctly

Comment 5

12 years ago
O.K. I only attached one, I will insert the css here:

Recorder.css
/* CSS Document */

      body {background-image: url('bg.gif')}
	  div.head {margin: 0 1%}
	  div.join {clear: both; margin: 1em 0}
	  div.meat {clear: both}
	  div.footer {clear: both; padding: 1em 5em;  text-align: center}
	  a.button:link {width: 100%; padding: .15em; color: #000000; border: 4px #a0b5c1 outset}
	  a.button:hover {width: 100%; padding: .15em; background-color: #fbec8c; color: #0000ff; border: 4px #a0b5c1 inset}
	  a.button:active {width: 100%; padding: .15em; background-color: #fbec8c; color: #000000; border: 4px #a0b5c1 inset}
	  a.button:visited {width: 100%; padding: .15em; color: #0000ff; border: 4px #a0b5c1 outset}
	  a:link {color: #5454ff; text-decoration: none; font: 400 16px "goudy old style", serif}
	  a:hover {color: #000000; text-decoration: underline; font: 400 16px "goudy old style", serif}
	  a:active {color: #000000; text-decoration: line-through; font: 400 16px "goudy old style", serif}
	  a:visited {color: #5454ff; font: 400 1em "goudy old style", serif}
	  ul {padding: 0 2%; margin: 0; list-style: none; line-height: 1.25}
	  #nav, #nav ul {padding: 0; margin: 0;	list-style: none; line-height: 1}
	  #nav a {display: block; width: 10em; background-color: #ffffc0; text-align: center}
	  #nav li {float: left;	width: 10em}
	  #nav li ul ul {margin: -1em 0 0 10em}
	  #nav li ul, #nav li:hover ul ul, #nav li.sfhover ul ul {position: absolute; width: 10em; left: -999em}
	  #nav li:hover ul, #nav li li:hover ul, #nav li.sfhover ul, #nav li li.sfhover ul {left: auto}
	  img.header {float: left; display: inline; margin-right: 12px}
	  img {border: 0}
	  img.main {float: right; display: inline; vertical-align: middle; margin: 5px}
	  b {color: #996633; font: 800 2em "goudy old style", serif}
	  p, font {font: 400 1em "goudy old style", serif}
	  p.hd {font: 600 .7em "goudy old style", serif}
	  p.head {font: 300 .6em "goudy old style", serif}
	  p.tab {margin: 0 2%}
	  p.big {font: 600 1.5em "goudy old style", serif}
	  font.header {text-align: center; font: 600 1em "goudy old style", serif}
	  font.small {font: 400 .75em "goudy old style", serif}
	  p.bold, font.b {font: 600 1em "goudy old style", serif}

Election.css
/* CSS Document */

      a.blank:link {text-decoration: none}
	  a.blank:hover {text-decoration: none}
	  img.left {float: left; margin: 2%}
	  div.cen, div.cmall {text-align: center; clear: both}
	  div.lt, div.rt {width: 33%}
	  div.cmall {width: 80%}
	  div.lt {float: left}
	  div.rt {float: right}
	  ul {list-style: none}
	  span.left {float: left; width: 60%; text-align: left}
	  span.right {float: right; width: 30%; text-align: left}
	  font.h2 {text-align: center; font: 800 1.5em "goudy old style", serif}
QA Contact: editor
Assignee: mozeditor → nobody
You need to log in before you can comment on or make changes to this bug.