Intent to prototype & ship document.caretRangeFromPoint

32 views
Skip to first unread message

Leo Tenenbaum

unread,
Feb 19, 2026, 9:38:37 AM (21 hours ago) Feb 19
to dev-pl...@mozilla.org

Summary:

caretRangeFromPoint is a non-standard API for obtaining a Range object (node and position within node) from pixel coordinates, similar to caretPositionFromPoint. It has been available in Blink/WebKit since 2010, and recently there has been an attempt to standardize it. The web-platform-tests have already been accepted.

Implementing caretRangeFromPoint allows us to fix caretPositionFromPoint’s shadow DOM behavior without introducing regressions, as discussed here: https://bugzilla.mozilla.org/show_bug.cgi?id=1927838

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1550635

Specification proposal: https://github.com/w3c/csswg-drafts/pull/12362

Standards body: W3C

Platform coverage: all

Preference: dom.caretRangeFromPoint.enabled

Other browsers:

Chrome: shipped since version 4

Safari: shipped since version 5

web-platform-tests: https://github.com/web-platform-tests/wpt/pull/54409

DevTools bug: N/A

Extensions bug: N/A


Reply all
Reply to author
Forward
0 new messages