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

I don't think that matches the author expectation. If a hit testing was done on a text assigned to a slot, then I want to know that the content inside a slot is picked, not on a shadow host. Whether an element generates a CSS box or not doesn't seem like an important distinction from the developer ergonomics standpoint of view.

With the proposed behavior, the author who wants to detect whether a given point is inside a slot or not, would have to check whether a node / element returned by these functions are assigned to some slot. It's even worse. If it was a descendent of another element with `display: contents` outside the shadow tree, we'd have to walk up the tree to find if the ancestor, which is a direct child of the shadow root is assigned to a slot or not. That seems like a lot of extra complexity for developers.

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

Received on Wednesday, 17 October 2018 21:51:59 UTC