Skip to content
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

[css-highlight-api] Should highlightsFromPoint exclude obscured content? #11770

Open
ffiori opened this issue Feb 24, 2025 · 0 comments
Open

Comments

@ffiori
Copy link
Contributor

ffiori commented Feb 24, 2025

Currently highlightsFromPoint doesn't specify if it should return custom highlights that are obscured by other elements. Right now the implementation doesn't return any highlights if they're obscured, but I'm opening this issue in case there's strong arguments about it before updating the spec.

It doesn't seem intuitive at first sight to return them if they're behind another element because you wouldn't expect the highlights to react to for example hovering over them or clicking on them if there's another thing on top. Think of a spelling error that's highlighted but there's a translucent rectangle box on top of it, it doesn't sound like the highlight should react to the mouse moving over it. I can't think of any use cases where returning obscured highlights could be useful.

See this example https://jsfiddle.net/16qagcw4/1/

This issue came up on a discussion in the intent to ship for highlightsFromPoint, see https://groups.google.com/a/chromium.org/g/blink-dev/c/8OpfR1m_zjU/m/n-62BUBpAgAJ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant