Closed Bug 1851244 Opened 3 years ago Closed 2 years ago

CSS Media Queries "pointer" and "hover" are suboptimal

Categories

(Core :: Widget: Win32, defect, P3)

All
Windows
defect

Tracking

()

RESOLVED DUPLICATE of bug 1735765

People

(Reporter: cmartin, Assigned: cmartin)

References

Details

In Bug 1813979, we fixed the any-pointer and any-hover media queries. Those are a bit more straightforward, because they don't rely on Firefox to make a judgement call about which pointer should be considered the "primary pointer" on a given machine.

However, our reporting of pointer and hover are still not great -- There are several bugs on machines like the Dell XPS (touchscreen and touchpad built in) and the Surface Pro (screen that supports both touch and pen digitizer, keyboard + touchpad dock) that report things that are not objectively wrong, but maybe not the best answer.

For example, we report the Surface Pro as a coarse pointing device, even when docked. This is tough, but IMO if the user has their machine docked, their intent is probably to use the touchpad.

Likewise, we report the Dell XPS as a coarse pointing device because its touchscreen makes it "tablet-like", even though it's main pointing device is clearly meant to be the touchpad.

Assignee: nobody → cmartin
Severity: -- → S3
Status: NEW → ASSIGNED
Priority: -- → P3
See Also: → 1806259
Duplicate of this bug: 1635469
See Also: → 1635469
See Also: → 1499344

Why not just report to the page based on the last pointing device used?
If there are multiple and one is coarse (touch screen) change the report after knowing the change happened. Maybe after some tolerance delay.
Maybe even ignoring all touch events during the transition and for 1s after the transition so the user can adapt.

(In reply to brunoais from comment #2)

Why not just report to the page based on the last pointing device used?
If there are multiple and one is coarse (touch screen) change the report after knowing the change happened. Maybe after some tolerance delay.
Maybe even ignoring all touch events during the transition and for 1s after the transition so the user can adapt.

Thank you for taking interest in our input handling pipeline. You'll be happy to know that your suggestion is already quite similar to one of the possibilities that is currently being fleshed out in hopes to improve Firefox.

There are pros and cons to this approach (many of which I'm sure you can already foresee), so I suspect it will ultimately be on our product team to decide what will provide the best user experience from the suggestions the engineering team presents to them. Hopefully, there will be more info on this later on this year.

Also appears on Win11 Laptop with a trackpad.

To reproduce
open console and test matchMedia("(pointer: fine)").matches

Hey, can you show me the codebase where this is implemented? I would like to contribute to fixing this bug ASAP.

Flags: needinfo?(cmartin)

(In reply to mayank.srmu from comment #5)

Hey, can you show me the codebase where this is implemented? I would like to contribute to fixing this bug ASAP.

So, the main issue with this bug is that we're not totally sure what "fixing this bug ASAP" even means, as we don't currently have a target to aim for.

For background, please give this section of the Firefox docs a quick read.

Since you asked for it, the actual code that handles this is here, but again -- fixing this is not as simple as a changing a few lines of code. It's a policy decision.

(In reply to mayank.srmu from comment #4)

Also appears on Win11 Laptop with a trackpad.

To reproduce
open console and test matchMedia("(pointer: fine)").matches

One way you could help is to expand on this more! What is the behavior you're seeing, and why is it objectionable? This could help us formulate a plan that will make our users happy!

Flags: needinfo?(cmartin)

(In reply to Chris Martin [:cmartin] from comment #6)

(In reply to mayank.srmu from comment #5)

Hey, can you show me the codebase where this is implemented? I would like to contribute to fixing this bug ASAP.

So, the main issue with this bug is that we're not totally sure what "fixing this bug ASAP" even means, as we don't currently have a target to aim for.

For background, please give this section of the Firefox docs a quick read.

Since you asked for it, the actual code that handles this is here, but again -- fixing this is not as simple as a changing a few lines of code. It's a policy decision.

(In reply to mayank.srmu from comment #4)

Also appears on Win11 Laptop with a trackpad.

To reproduce
open console and test matchMedia("(pointer: fine)").matches

One way you could help is to expand on this more! What is the behavior you're seeing, and why is it objectionable? This could help us formulate a plan that will make our users happy!

I do not have a touch screen. In this case, returning pointer: course doesn't make any sense. I am using this property to either show or hide mouse-follower -- check https://mayank-chaudhari.vercel.app and https://mkc-five.vercel.app . Works well on chrome and edge. But Firefox behaves strange.
Earlier I tried using a hover media query, but it didn't hide the follower and mouse trail on any devices.

:cmartin — should this bug be merged into bug 1735765?

Flags: needinfo?(cmartin)

(In reply to Ray Kraesig [:rkraesig] from comment #8)

:cmartin — should this bug be merged into bug 1735765?

Sounds like a good idea to me! I think probably most of these "primary pointer" type bugs should just be merged into that one.

Flags: needinfo?(cmartin)
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1735765
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.