Open Bug 511523 Opened 15 years ago Updated 3 years ago

Pressing enter to break out of a list twice and typing in a new line causes text to appear in the previous line

Categories

(Core :: DOM: Editor, defect, P5)

x86
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: vkarun, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9) Gecko/2008052912 Firefox/3.0
Build Identifier: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9) Gecko/2008052912 Firefox/3.0

Assume we have the following DOM structure. This can be obtained from the steps given below.

<ul _moz_dirty=""><li>a<li></ul>
<br _moz_dirty="" type="_moz"/>
<br _moz_dirty="" type="_moz"/>
<ul _moz_dirty=""><li>b</li></ul>

Now typing text in the second blank line between the UL's causes it to appear in the previous blank line. If we have more than two lines, typing text in the last line sometimes causes it to appear in the previous line and sometimes in the previous two lines.

Reproducible: Always

Steps to Reproduce:
1. Type one, enter, two
2. Select all and convert it into a bulleted or numbered list.
3. Place the cursor at the end of the bulleted item one and press enter twice to break out of the list and create a new line.
4. Repeat step 3 again to create another new line.
5. After this step, the HTML looks like.

<ul _moz_dirty="">
<br _moz_dirty="" type="_moz"/>
<br _moz_dirty="" type="_moz"/>
<ul _moz_dirty="">

6. Place the cursor in the second new line and start typing.
Actual Results:  
The text appears in the previous line.

Expected Results:  
The text should appear the cursor position.

This didn't manifest when we removed type="_moz" from the BRs in firebug.

Bulk-downgrade of unassigned, >=5 years untouched DOM/Storage bugs' priority.

If you have reason to believe this is wrong (especially for the severity), please write a comment and ni :jstutte.

Severity: normal → S4
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.