elm-pointer-events icon indicating copy to clipboard operation
elm-pointer-events copied to clipboard

Addition of movementX/Y to MouseEvent

Open pro100filipp opened this issue 2 years ago • 7 comments

According to official docs, movementX/Y is well-supported both by Safari and iOS. If you don't mind, I'd like to make a PR adding it.

pro100filipp avatar Jun 19 '23 09:06 pro100filipp

Hum, according to the docs, it’s well supported for quite some time (2015), roughly the same as FF and chrome. And I started this library around 2017. So I suspect there was still something not working well with movementX/Y ... (but I don’t remember what, maybe related to "pointer" events?) Would you mind being extra precautious with testing it’s behaving the same in different OS? Then the PR is welcome of course!

mpizenberg avatar Jun 19 '23 09:06 mpizenberg

Yes, that also seemed strange to me. I'll do some investigation and tell about results. Hope in 2023 it'll "just work" though :)

pro100filipp avatar Jun 19 '23 09:06 pro100filipp

Unfortunately, mobile Safari PointerEvent really does not have movementX/Y. I also did some testing on Chrome, Brave and FF – none of them had movementX/Y too. MDN standard looks like a fucking joke – even in 2023.

The issue can be closed I think, sorry for the disturbance(

pro100filipp avatar Jun 19 '23 14:06 pro100filipp

Thanks for checking

mpizenberg avatar Jun 19 '23 15:06 mpizenberg

Also, as I often say to other people with specific requests, this package is convenient for quick prototyping, but don’t hesitate to extract the functions and decoder you need instead of depending on the package.

mpizenberg avatar Jun 19 '23 15:06 mpizenberg

Of course – and thank you for the convenient API made for this) Just thought it'd be a good candidate for a standard functionality

pro100filipp avatar Jun 19 '23 16:06 pro100filipp

Note to self (or anyone willing to do a docs PR): better explain that movementX/Y are not in because the support for pointer events is not good, and we are reusing the same decoder for mouse events and pointer events.

mpizenberg avatar Jun 19 '23 16:06 mpizenberg