MouseEvent.pageX/pageY fill isn't needed in jQuery 3.0 #3092
|
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! |
|
I think we should remove the |
anseki
commented
May 6, 2016
|
I think that |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Related to: #3080
Original comment: #3080 (comment)
Since Firefox returns
0asclientTop/clientLeftofhtmlelement always,MouseEvent.pageX/pageYmight be incorrect.When native
eventobject doesn't havepageX/Y,jQuery.event.mouseHooks.filtercalculates these usingdocument.documentElement.clientLeft/clientTop(i.e.border-widthofhtmlelement).(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: 10is correct result. That is,jQuery.event.mouseHooks.filtershould not subtractclientTop/clientLeft.