You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 23, 2018. It is now read-only.
The CSSOM View Module redefines pageX and pageY as double. To make matters worse, IE 11 is prescient, and already treats them as such. IE 10 seems to exhibit the same issue.
(Crummy) SSCCE: on IE 11, go to jquery.com, scroll down the page a bit, run $('body').on('mousemove', function (e) { console.log(e.pageX, e.pageY) }), and waggle the cursor. Non-integral Y positions abound.
It would be nice to (also) get a patch version that decodes them as floats then rounds, just so existing libraries (e. g. https://github.com/zaboco/elm-draggable) work without changes.
The text was updated successfully, but these errors were encountered:
It would be useful to have these values as floats with the decimals intact. We have a package that relies on detecting the direction of the mouse pointer movement (comparing last position to current position), and without the decimals, the algorithm does a lousy job at slow speeds because all values are rounded to the closest integer - any small movement registers as no movement.
I hit this issue today on IE 10, I don't need the position value but the Decoder is failing because pageX and pageY are Float in IE and the Position decoder expects Ints. Hence this line, in the DOM library in DOM.js:22 is never executed
I imagine the fix would be easy but would require a major bump in the version. Something like
type alias Position =
{ x : Float
, y : Float
}
position : Json.Decoder Position
position =
Json.map2 Position
(Json.field "pageX" Json.float)
(Json.field "pageY" Json.float)
The CSSOM View Module redefines
pageX
andpageY
asdouble
. To make matters worse, IE 11 is prescient, and already treats them as such. IE 10 seems to exhibit the same issue.(Crummy) SSCCE: on IE 11, go to
jquery.com
, scroll down the page a bit, run$('body').on('mousemove', function (e) { console.log(e.pageX, e.pageY) })
, and waggle the cursor. Non-integral Y positions abound.It would be nice to (also) get a patch version that decodes them as floats then rounds, just so existing libraries (e. g. https://github.com/zaboco/elm-draggable) work without changes.
The text was updated successfully, but these errors were encountered: