Open Bug 1822714 Opened 2 years ago Updated 6 months ago

[Pointer Events] Firefox macOS + Wacom stylus tiltY is inverted

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

Firefox 111
defect

Tracking

()

ASSIGNED

People

(Reporter: redux, Assigned: akisakurai)

References

(Blocks 1 open bug)

Details

Attachments

(6 files)

Steps to reproduce:

Actual results:

the tiltY value is inverted - when the pen's "back end" (eraser tip) is tilted towards the user, tiltY is reporting negative values, and when the pen is tilted away from the user, it's reporting positive tiltY values

Expected results:

per the spec https://w3c.github.io/pointerevents/#dom-pointerevent-tilty when the pen is tilted towards the user, tiltY has positive values, and negative values when pointing away from the user

running the Wacom diagnostic tool, which reports the sensor data, it can be seen that this is the case ... but Firefox seems to then flip the sign for the value.

running the same page in Chrome/macOS, the values reported there for tiltY are correct. testing on Firefox/Windows shows that there tiltY is also reported correctly, so this seems a macOS-specific problem.

Attached image wacom diagnostic
Attached image firefox macos
Attached image chrome macos.png

the above three images show what happens when tilting the pen away from the user. both the wacom diagnostic tool and chrome (purple UI) show negative tiltY values. firefox, on the other hand, shows a positive tiltY value. (the specific values aren't exactly the same, as my hand moved in between screenshots, but in all three cases, the pen was tilted with its end away from me)

Attached image chrome macos photo
Attached image firefox macos photo

added two actual photos showing both the pen tracker (and its reported values) and my actual hand with the stylus (quite unnaturally) tilted away from me - compare the negative tiltY and correct visualisation of the pen in the case of Chrome, and the inverted way it reports/appears on Firefox

Component: Untriaged → DOM: UI Events & Focus Handling
Product: Firefox → Core
Severity: -- → S3

As a semi-related bug, Firefox is reporting tiltX=1 and tiltY=1 for a Wacom pen that doesn't support tilt. Yes, I should report this as a separate bug (and I'll probably do it later), but I'm mentioning it here because whoever decides to fix this tiltY axis could also take a look at the surrounding code.

For hardware and platforms that do not report tilt, the value MUST be 0. https://www.w3.org/TR/pointerevents/#pointerevent-interface

For whoever decides to investigate this bug, I believe the relevant code is in two files:

If anyone is interested, this seems to be the related Chromium source-code: https://source.chromium.org/chromium/chromium/src/+/main:ui/events/x/events_x_utils.cc It seems to get the data directly from X11 events, while Firefox reads from GDK events. I couldn't test the tiltY on any of the browsers, as my tablet doesn't support it. (Likewise, I can't test the Twist.)

(In reply to Denilson Figueiredo de Sá from comment #8)

If anyone is interested, this seems to be the related Chromium source-code: https://source.chromium.org/chromium/chromium/src/+/main:ui/events/x/events_x_utils.cc It seems to get the data directly from X11 events, while Firefox reads from GDK events. I couldn't test the tiltY on any of the browsers, as my tablet doesn't support it. (Likewise, I can't test the Twist.)

I guess this bug is about MacOS but you reference Linux code here.

Oops, sorry! My mistake! Sorry for the noise.

Assignee: nobody → akisakurai
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: