[wpt-sync] Sync PR 46863 - Move the caret by paragraph granularity should cross editing boundary
Categories
(Core :: DOM: Selection, task, P4)
Tracking
()
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. ButInSameParagraph
does not allow crossEditingBoundary
, 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
Assignee | ||
Updated•5 months ago
|
Assignee | ||
Comment 1•5 months ago
|
||
Assignee | ||
Comment 2•5 months ago
|
||
Assignee | ||
Comment 3•5 months ago
|
||
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
Details
Firefox-only Failures
- /selection/move-paragraph-cross-editing-boundary.tentative.html [wpt.fyi]
- not cross editing boundary:
FAIL
- not cross editing boundary:
New Tests That Don't Pass
- /selection/move-paragraph-cross-editing-boundary.tentative.html [wpt.fyi]
- cross editing boundary:
FAIL
(Chrome:FAIL
, Safari:FAIL
) - not cross editing boundary:
FAIL
(Chrome:PASS
, Safari:PASS
)
- cross editing boundary:
Comment 5•5 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a0627676fb87
https://hg.mozilla.org/mozilla-central/rev/0debc6f3c0e9
Description
•