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

elementsFromPoint behavior is unclear #735

Closed
smaug---- opened this issue Feb 15, 2018 · 4 comments
Closed

elementsFromPoint behavior is unclear #735

smaug---- opened this issue Feb 15, 2018 · 4 comments

Comments

@smaug----
Copy link

Per spec ShadowRoot.elementsFromPoint may return an array which contains host element several times, since retargeting is done for each elements in the result array.

@hayatoito
Copy link
Contributor

hayatoito commented Feb 16, 2018

FYI. There is an issue filed for csswg: w3c/csswg-drafts#556

I remember that Blink recently tried to fix the broken behavior in https://chromium-review.googlesource.com/c/chromium/src/+/808446.

Per spec ShadowRoot.elementsFromPoint may return an array which contains host element several times, since retargeting is done for each elements in the result array.

That sounds fair argument.

@TakayoshiKochi @rakina WDYT? Does blink return an array which has several same elements for elementsFromPoint?

@rakina
Copy link
Member

rakina commented Feb 16, 2018

Right now elementsFromPoint doesn't return multiple identical elements (https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/dom/TreeScope.cpp?sq=package:chromium&l=276)

@smaug----
Copy link
Author

Yeah, it doesn't and Gecko won't either, but per spec it should. So implementing the API is guess work atm.

@rniwa
Copy link
Collaborator

rniwa commented Apr 20, 2023

Closing this in favor of #736

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

5 participants