Bug 172137

Summary: Implement caretPositionFromPoint()
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ahmad.saleem792, ap, ben, bfulgham, cdumez, karlcow, rniwa, sebastianzartner, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Comment 1 Ahmad Saleem 2022-07-28 14:37:37 PDT
WPT test cases fail in Safari 15.6 on macOS 12.5 - https://wpt.fyi/results/css/cssom?label=master&label=experimental&aligned&q=caretpositionfrompoint

Only Firefox seems to pass them so far.
Comment 2 Radar WebKit Bug Importer 2022-07-28 20:16:19 PDT
<rdar://problem/97760045>
Comment 3 Karl Dubost 2024-01-17 16:19:39 PST
seeAlso https://github.com/WebKit/standards-positions/issues/301
Comment 4 Benjamin Atkin 2024-06-01 22:53:29 PDT
I found that it doesn't return the element within the shadow DOM and looked for a way to get it. There doesn't appear to be one yet.

A shadowRoots parameter was added to the draft: https://github.com/w3c/csswg-drafts/pull/10200

https://github.com/w3c/csswg-drafts/blob/main/cssom-view-1/Overview.bs#L1018

https://drafts.csswg.org/cssom-view-1/#extensions-to-the-document-interface