-
Notifications
You must be signed in to change notification settings - Fork 20.6k
MouseEvent.pageX/pageY fill isn't needed in jQuery 3.0 #3092
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
Comments
It's possible we don't need that code at all in 3.x (maybe even 2.x) depending on where pageX/Y are provided. If https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/pageX is correct it seems we should be covered even for 2.x. Removing it would be better than fixing it! |
Agreed. |
I think we should remove the |
Fixes jquerygh-3092 IE8 was the last major browser missing these.
I think that |
Awesome, thanks for the confirmation! |
MouseEvent.pageX/pageY
Related to: #3080
Original comment: #3080 (comment)
Since Firefox returns
0
asclientTop/clientLeft
ofhtml
element always,MouseEvent.pageX/pageY
might be incorrect.When native
event
object doesn't havepageX/Y
,jQuery.event.mouseHooks.filter
calculates these usingdocument.documentElement.clientLeft/clientTop
(i.e.border-width
ofhtml
element).(But I don't know recent browser that doesn't support
event.pageX/Y
.)Represent:
https://jsfiddle.net/rent9q5g/
This simulates a browser that doesn't support
event.pageX/Y
.Chrome:

IE:

Firefox:

incorrect result in Firefox by its bug, but I think
pageX: 10 pageY: 10
is correct result. That is,jQuery.event.mouseHooks.filter
should not subtractclientTop/clientLeft
.The text was updated successfully, but these errors were encountered: