Closed Bug 1574398 Opened 2 years ago Closed 2 years ago

wrong numbering of nested lists

Categories

(Core :: Layout: Generated Content, Lists, and Counters, defect)

68 Branch
Desktop
All
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1548753
Tracking Status
firefox68 --- wontfix
firefox69 --- fix-optional
firefox70 --- fix-optional

People

(Reporter: angelo.borsotti, Unassigned)

References

(Regression)

Details

(Keywords: regression)

User Agent: Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0

Steps to reproduce:

Open the following file:

<html>
<body>
<ol>
<li>first</li>
<ol>
<li>first - 1</li>
<li>first - 2</li>
</ol>
<li>second</li>
</ol>
</body>
</html>

Actual results:

The "second" item of the outermost list is numbered "3".

Expected results:

The "second" item of the outermost list should be numbered "2"

I have reproduced this issue on Mac OS 10.13.6, Windows 10 and Ubuntu 18.04.2 LTS, on Nightly v70.0a1, Beta v69.0b14 and Release v68.0.2.

Status: UNCONFIRMED → NEW
Component: Untriaged → Editor
Ever confirmed: true
OS: Unspecified → All
Product: Firefox → Core
Hardware: Unspecified → Desktop
Component: Editor → Layout: Generated Content, Lists, and Counters
Flags: needinfo?(mats)
Keywords: regression
Regressed by: 205202

This is bug 1548753, markup in comment 0 is invalid (as in, the <ol> should really be inside the <li>), but... See there for more details.

Status: NEW → RESOLVED
Closed: 2 years ago
Flags: needinfo?(mats)
Resolution: --- → DUPLICATE
Duplicate of bug: 1548753

If putting <OL> directly under another <OL> is invalid, then Firefox should not generate such structure when call execCommand("indent");

<div contenteditable>
<ol>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ol>
</div>

<button onclick=test()>test</button>
<script>
function test() {
document.execCommand("indent");
}
</script>

Put cursor at "3", then click the button to run execCommand("indent"), Firefox will change the structure to

<ol>
<li>1</li>
<li>2</li>
<ol>
<li>3</li>
</ol>
<li>4</li>
<li>5</li>
</ol>

And in fact, Chrome, IE, Edge have the same behavior for execCommand("indent"), but only Firefox shows wrong number. Then if user creates the content from other browser with <div contenteditable> then show in Firefox, it is still wrong.

I would like to have this bug reopen. Indeed, Chorme, IE and Firefox all show the expected behavior with nested lists like the example proposed above. Only Thunderbird displays something wrong.

Ex:

<ol>
<li>A</li>
<ol>
<li>B</li>
<li>C</li>
<li>D</li>
</ol>
<li>E</li>
</ol>

Browsers display

1. A
    1. B
    2. C
    3. D
2. E  <== Fine!

Thunderbird displays:

1. A
    1. B
    2. C
    3. D
4. E <== No...
Duplicate of this bug: 1696340
You need to log in before you can comment on or make changes to this bug.