Closed Bug 2017371 Opened 9 months ago Closed 8 months ago

[wpt-sync] Sync PR 57836 - [Editing] Fire selectionchange event when deleting last character from content-editable inline element.

Categories

(Core :: DOM: Selection, task, P4)

task

Tracking

()

RESOLVED FIXED
150 Branch
Tracking Status
firefox150 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 57836 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/57836
Details from upstream follow.

Pranav Modi <pranavmodi@microsoft.com> wrote:

[Editing] Fire selectionchange event when deleting last character from content-editable inline element.

Deleting the last character from a contenteditable inline element
did not fire the selectionchange event. This happened because
RemoveAllChildrenIfPossible() removed the text node directly, bypassing
DeleteTextFromNode() and its event chain.

It has been fixed by deleting text from all descendant text nodes
via DeleteTextFromNode() before RemoveAllChildrenIfPossible()
removes them, ensuring selectionchange fires correctly.

Bug: 475155072
Change-Id: I266563fd4589593db39d76bc44be4788dd30da69
Reviewed-on: https://chromium-review.googlesource.com/7557953
WPT-Export-Revision: 30c7315b4720eb44ba07182100f31813b3b9a4eb

Component: web-platform-tests → DOM: Selection
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests and 3 subtests

Status Summary

Firefox

OK : 1
PASS: 2
FAIL: 1

Chrome

OK : 1
PASS: 1
FAIL: 2

Safari

OK : 1
FAIL: 3

Links

GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/39a76f5f73b0 https://hg.mozilla.org/integration/autoland/rev/a0e20df8bc5c [wpt PR 57836] - [Editing] Fire selectionchange event when deleting last character from content-editable inline element., a=testonly https://github.com/mozilla-firefox/firefox/commit/079ccb557396 https://hg.mozilla.org/integration/autoland/rev/a0a48c9ba42b [wpt PR 57836] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 150 Branch
You need to log in before you can comment on or make changes to this bug.