-
Notifications
You must be signed in to change notification settings - Fork 20.6k
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
event.pageY is browser dependend #3676
Comments
This is a long-standing problem with margins on the html or body elements. There are comments already for Most CSS resets explicitly set margin and padding on html and body to 0 which would solve the issue. Is that something you can do? |
We use the margin-top in a CMS to add a menu at the top of the viewport, pushing down the rest of the theme, and not setting margin-top respectively would cause a lot of other issues. I can work around this issue, though. Anyhow, after some further testing, this is obviously a bug in IE, since event.clientY reports an expected value, see https://jsfiddle.net/5a1536bq/6/. |
Thank you for opening an issue, but we're not likely to make changes here. |
Description
event.pageY
is browser dependent if there is amargin-top
set for the<html>
element. While on most browsers I've tested (Chrome 58.0.3029.110, Firefox 53.0.2 and Edge 38.14393.1066.0) it takes into account themargin-top
, it doesn't do so on IE 11.1198.14393.0. I would expect the behavior to be consistent.Link to test case
https://jsfiddle.net/5a1536bq/
Open the console to see the debug values. Both should be roughly the same, but on IE they're not.
PS: to see the debug output, you have to click on "foo".
The text was updated successfully, but these errors were encountered: