Re: [csswg-drafts] [css-highlight-api] Should `highlightsFromPoint()` hit the same set of boxes that highlights paint over (e.g. replaced elements like `<img>`)? (#14126)

One model would be caretPositionFromPoint, but that explicitly says "where text insertion could occur". In Chromium, from memory, you can get a position right before or after an inline image in some circumstances.

My immediate reaction is that highlightsFromPoint should return the highlights that are painted regardless of what's under the point. I think a user or developer would be surprised if there was no way to identify a highlights painted over a replaced element or something else. Presumably you're trying to identify the highlight to remove it or otherwise take some action, so making the highlight effectively invisible seems wrong. 

-- 
GitHub Notification of comment by schenney-chromium
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/14126#issuecomment-4894156591 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 6 July 2026 14:48:29 UTC