Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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/c/chromium/src/+/5319076 Reviewed-by: Koji Ishii <kojii@chromium.org> Reviewed-by: Kent Tamura <tkent@chromium.org> Commit-Queue: Peng Zhou <zhoupeng.1996@bytedance.com> Cr-Commit-Position: refs/heads/main@{#1317952}
- Loading branch information