Closed Bug 1904068 Opened 5 months ago Closed 5 months ago

[wpt-sync] Sync PR 46863 - Move the caret by paragraph granularity should cross editing boundary

Categories

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

task

Tracking

()

RESOLVED FIXED
129 Branch
Tracking Status
firefox129 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

zhoupeng <zhoupeng.1996@bytedance.com> wrote:

Move the caret by paragraph granularity should cross editing boundary

Consider this test case:
\<div contenteditable>
\<p id="one">P1\</p>
\<p id="two">
Paragraph 1: Hello World Test\n
Paragraph 2: \<span contenteditable="false">Hello\</span> World|
\</p>
\</div>
The expected behavior of
selection.modify('move', 'backward', 'paragraph') is to
move the caret to the end of p#one. But due to the presence of
the non-editable node, the behavior looks like "line" granularity.

Next/PreviousParagraphPosition calls
Next/PreviousLinePosition to get the specified position until
it is no longer in the same paragraph. But InSameParagraph
does not allow cross EditingBoundary, so when there is
a non-editable node, the behavior is similar to the line.

Firefox doesn't implement paragraph, so a tentative test is added.

Bug: 326554272
Change-Id: I68115cebe3bc3845a3dfe29ef56c6a5c8f1f9969
Reviewed-on: https://chromium-review.googlesource.com/5319076
WPT-Export-Revision: 4e5c40db866ee4ae809bf2e641551a0b695205dc

Component: web-platform-tests → DOM: Selection
Product: Testing → Core

CI Results

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

Total 1 tests and 2 subtests

Status Summary

Firefox

OK : 1
FAIL: 2

Chrome

OK : 1
PASS: 1
FAIL: 1

Safari

OK : 1
PASS: 1
FAIL: 1

Links

GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

New Tests That Don't Pass

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a0627676fb87 [wpt PR 46863] - Move the caret by paragraph granularity should cross editing boundary, a=testonly https://hg.mozilla.org/integration/autoland/rev/0debc6f3c0e9 [wpt PR 46863] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch
You need to log in before you can comment on or make changes to this bug.