shadow-dom/MouseEvent-prototype-offsetX-offsetY.html fails with unexpected event coordinates.
Categories
(Core :: DOM: Events, enhancement, P3)
Tracking
()
People
(Reporter: emilio, Assigned: smaug)
References
Details
(Keywords: parity-chrome, parity-safari)
Reporter | ||
Updated•7 years ago
|
Reporter | ||
Comment 1•7 years ago
|
||
Updated•6 years ago
|
Assignee | ||
Comment 2•6 years ago
|
||
Comment 3•6 years ago
|
||
The first test failure I see here is due to a test bug: https://github.com/web-platform-tests/wpt/issues/15089
Once that's fixed, we probably need to re-evaluate.
Updated•6 years ago
|
Updated•6 years ago
|
Comment 4•6 years ago
|
||
So if I fix the test in the obvious way, by adding
line-height: 1; font-family: Ahem
to the my-host styles, then the test still fails, like so:
assert_equals: expected 21 but got 6
on this line:
assert_equals(eventLogs[0].offsetX, 21); // Padding edge of target is at (30px, 20px)
so there's still something funny going on here. I'm not sure why the test claims "Padding edge of target is at (30px, 20px)" if the target has 5px margin-left and the offsetLeft of the target is 45.
Maybe this test is expecting offsetX to be measured relative to the block parent of the inline or something?
Comment 5•6 years ago
|
||
Bu a simple testcase shows me that without shadow DOM involved that is exactly what we do: an event's offsetX is relative to the nearest block ancestor if it's targeted at an inline.
So in this case it should in fact be relative to the <div id="container">, which has an offsetLeft of 30, which means we should get 21. Why are we ending up with it relative to the <span id="target"> instead?
Updated•6 years ago
|
Assignee | ||
Updated•4 years ago
|
Updated•2 years ago
|
Description
•