Closed karlcow closed 2 years ago
Thanks for reaching out & spotting this! I pushed & released a fix that enables pressure in Firefox. I think I used to have problems with PointerEvents on mobile, but it seems to be working fine when I was testing it just now.
Thanks! I still see isFirefox
uses, can those be removed too or are there still problems?
Edit: Pressure now works on Surface Pro 7 👍
Glad that it's working now!
I used to have a few more problems with PointerEvents when testing on Windows 10:
I will check if those are still around. The last time I tested was ~2 years ago. If the bold issues are gone I can remove isFirefox
.
movementX/Y are equal to pageX/Y in coalesced events (not 100% on this)
I can confirm this: https://bugzilla.mozilla.org/show_bug.cgi?id=1753724. I guess the following is the relevant code here:
I think others are okay now. Please ping if not 👍
Thanks for confirming. Yes that's the relevant code. Perhaps there is a way to check for that issue that doesn't involve useragent sniffing.
I'll keep an eye on that ticket.
@saschanaz The second issue "when using pen, values of 'button' and 'buttons' are irregular" is still present. I've created a demonstration page: https://bitbof.com/stuff/2022-03-08-ff-pointer-buttons/
The first pointermove after pointerdown sometimes has the value 0 for buttons
.
Screenshot (top are the most recent pointer events):
Interesting, which device are you using? I don't see such inconsistency on Surface Pro 7 (Windows 11) 🤔, I wonder whether this is device specific...
Oh, never mind. I also see it from some of the first pointermove events.
Yea it doesn't happen every time. I've created a separate issue for removing isFirefox
: https://github.com/bitbof/klecks/issues/5
Thanks! Shouldn't that be "pointermove shouldn't return buttons: 0"?
Oops, sure. Fixed it.
On https://github.com/webcompat/web-bugs/issues/99826#issuecomment-1061461720
@dholbert determined there was user agent detection against Firefox which removed the ability for Firefox users to use the pressure for affecting the drawing.
Could you fix it?