-
Notifications
You must be signed in to change notification settings - Fork 658
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
[cssom-view] Should table rows be returned by elementFromPoint & elementsFromPoint? #4182
Comments
In https://crbug.com/647594#c17 it was found that The cssom-view spec issue "The terms CSS layout box and SVG layout box are not currently defined by CSS or SVG." seems related to this issue. |
Tested behavior of elementsFromPoint inside true tables, dom tables, and anonymous tables. FF86, Chrome 88, Safari 14, IE 17, and IE 11 all agree:
It looks like this is the defacto standard. Attached the test file used that is compatible with IE11. |
It's pretty weird that those internal table elements aren't returned; they have dimensions and positions that should overlap with the point. I feel like we shouldn't go for bugward compat here unless it proves necessary (which I suspect is unlikely). |
It is weird, and I've seen bugs filed about this. It makes implementation more complex. If you believe that returning rows & sections has a shot at being web compatible, we could try it out. |
I ran into this today. I had used |
https://drafts.csswg.org/cssom-view/#dom-document-elementsfrompoint
According to the spec, step 2 of the algorithm is to look for a layout box "that would be a target for hit testing".
Currently, Chromium, Gecko and Webkit do not return table rows from elementsFromPoint.
Should we? It seems the answer has to do with hit testing, which has no spec.
The text was updated successfully, but these errors were encountered: