Re: [csswg-drafts] [cssom-view] elementFromPoint, elementsFromPoint, and caretPositionFromPoint should not return an element inside a shadow tree

 I see, however, your concern also applies to the following case, right?

```html
<div id=a>
   <div id=b style="display: content">
     foo
   </div>
   <div id=c style="display: content">
     bar
   </div>
</div>
```
In this case, we can't tell whether the point is on `"foo"` text node or `"bar"` text node.
`elementFromPoint` always returns `<div id=a>` in either case, I think.
So your concern can be *converted* into more general one, I'm afraid.

I think what we want here is `nodeFromPoint`, instead of tweaking `elementFromPoint`, if we want to resolve this general concern.

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

Received on Thursday, 18 October 2018 09:21:24 UTC