Bug 172137 - Implement caretPositionFromPoint()
Summary: Implement caretPositionFromPoint()
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-05-15 15:04 PDT by Simon Fraser (smfr)
Modified: 2024-06-01 22:53 PDT (History)
10 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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