Drop -moz-touch-enabled
Categories
(Core :: CSS Parsing and Computation, enhancement, P3)
Tracking
()
People
(Reporter: hiro, Assigned: emilio)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete, site-compat)
Attachments
(2 files)
Updated•6 years ago
|
Comment 1•5 years ago
|
||
Modernizr 3.7.1 (March 14, 2019) includes detection for window.TouchEvent, so the legacy detection --
window.matchMedia('(-moz-touch-enabled)');
-- will someday be unnecessary on desktop (I think it's already unnecessary on mobile). However, I'm sure a lot of sites do not update Modernizr very quickly, so this will still be around for a while.
With that in mind:
If the user sets
dom.w3c_touch_events.enabled = 0
to disable touch events, unfortunately window.matchMedia('(-moz-touch-enabled)')
still returns true.
This leads to a broken experience on sites where mouse support is disabled in favor of touch support. It also creates a discrepancy that can be used for fingerprinting. How can this be fixed if this media query is going to live on for a while?
Assignee | ||
Comment 2•5 years ago
|
||
Ideally Modernizr would be fixed. But the media query is gone in bug 1588737.
Comment 3•5 years ago
|
||
Well, this bug is for removal and Bug 1588737 is for deprecation...
Assignee | ||
Comment 4•5 years ago
|
||
Guess we can keep this open and use this bug to flip the pref in release builds.
Comment 5•5 years ago
|
||
This should block bug 775235 for tracking.
Assignee | ||
Comment 6•5 years ago
|
||
Yup, it's about time to toggle the pref on in release too.
Assignee | ||
Comment 7•5 years ago
|
||
We've had it disabled on Nightly with no fallout for a while, and having it
enabled breaks websites with touch screens as described in this bug and related
ones.
Given the above, let's disable it in all channels, and we'll remove the code in
the next cycle.
Comment 9•5 years ago
|
||
bugherder |
Comment 10•5 years ago
|
||
Posted site compatibility note: https://www.fxsitecompat.dev/en-CA/docs/2019/moz-touch-enabled-media-feature-has-been-removed/
Comment 11•5 years ago
|
||
https://developer.mozilla.org/en-US/docs/Web/CSS/@media/-moz-touch-enabled
could/should have some words and a link to it's replacement media (pointer:coarse)
https://developer.mozilla.org/en-US/docs/Web/CSS/@media/pointer
Updated•5 years ago
|
Comment 12•5 years ago
|
||
Added a warning on the -moz-touch-enabled page that is unsupported as of 73, and to use pointer: coarse (linked) instead.
Description
•