Closed Bug 1738200 Opened 3 years ago Closed 3 years ago

Add WPT to check the behavior of insertText when caret is after "invisible" <br> element

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
96 Branch
Tracking Status
firefox96 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(1 file)

No description provided.

If a <br> element follows a visible thing and there is no visible content
between it and following block boundary (both child's and parent's), it's
called as "invisible" BR element at Mozilla.

Selection API can put caret after it but before the following block boundary
and of course, user may be able to put caret at there if the browser has a
bug like https://bugzilla.mozilla.org/show_bug.cgi?id=1738193.

Even in this case, user can type something if it's in editable content, and
even though this is an edge case, it's safe to get same result in any browsers
since web apps may put caret there accidentally.

The expected results are based on Blink's behavior and Gecko fails the cases
if the following block boundary is of a child block. However, no patch for
Gecko for now.

Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/b9d88b8e6d35
Add new tests to check the behavior of `insertText` command when caret is after "invisible" <br> element r=m_kato
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/31470 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: