Skip to content

[css-highlight-api] highlightsFromPoint(): Inconsistency between spec and test regarding shadow DOM #12045

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jnjaeschke opened this issue Apr 3, 2025 · 0 comments
Assignees

Comments

@jnjaeschke
Copy link
Member

There is a test which deals with a live range that starts and ends in light DOM, but has a shadow DOM part inside.

The test asserts that highlightsFromPoint() does not return anything when being called over the shadow DOM part.

However, the spec says that highlightsFromPoint() should return a Highlight if any of the DOMRects returned by getClientRects() of any range of the highlight intersects the point.

Both Gecko and Chrome also return DOMRects for the shadow DOM part, therefore the implementation would include the shadow DOM parts as well.

cc @ffiori @emilio @smaug----

@ffiori ffiori self-assigned this May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants