Closed Bug 1814074 Opened 1 year ago Closed 1 year ago

All list items are deleted when first list item follows an invisible white-space and all list item contents are selected

Categories

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

defect

Tracking

()

VERIFIED FIXED
112 Branch
Tracking Status
firefox112 --- verified
firefox113 --- verified

People

(Reporter: masayuki, Assigned: masayuki)

References

()

Details

Attachments

(1 file)

Load the URL.

Actual Result: <ul></ul>

Expected Result: <ul><li><br></li></ul>

Summary: All list items are deleted when first list item follows an invisible white-space and all list item contens are selected → All list items are deleted when first list item follows an invisible white-space and all list item contents are selected

It currently check range boundaries are start/end of a list element. However,
there are a lot of cases. E.g., selection can starts and/or ends inner
position due to invisible white-spaces and sub-lists.

The expectations of the new tests are based on Chrome's result. However,
unfortunately, the joining result of sub-lists is different from Chrome.
Therefore, they fail. (Gecko makes each list element has one list item.)

Depends on D168871

Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/b57b0356d5dd
Make `AutoDeleteRangesHandler::ExtendOrShrinkRangeToDelete` consider whether all list items are selected more carefully r=m_kato
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/38487 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
Upstream PR merged by moz-wptsync-bot
QA Whiteboard: [qa-112b-p2]

Reproduced this issue on an affected Nightly build from 2023-01-31, using the STR from Comment 0 on Win 10.
Verified as fixed on Firefox 112.0b9 (20230330182947) and Firefox 113.0a1 (20230403092724) across the following platforms: Win 10 x64, Ubuntu 20.04 and macOS 10.15.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: