Responsive Design Mode with touch simulation: navigator.maxTouchPoints still zero
Categories
(DevTools :: Responsive Design Mode, defect, P3)
Tracking
(firefox77 fixed)
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: redux, Assigned: mtigley)
References
(Blocks 1 open bug)
Details
(Whiteboard: [rdm-reserve])
Attachments
(4 files)
Reporter | ||
Comment 1•6 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
+1 Please fix asap!
navigator.maxTouchPoints returns 0 on a valid Touchscreen device causing tests for Touchscreen to fail, see:-
https://github.com/patrickhlauke/touch/issues/19
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 4•5 years ago
|
||
(In reply to Patrick H. Lauke from comment #1)
For comparison: Chrome DevTools, when emulating mobile devices with the
device toolbar, fakes a navigator.maxTouchPoints value of 1
Unless we have a way of knowing what the simulated device's navigator.maxTouchPoints
value is, we might need to have a fake value of 1 as well.
The only use case I can see for navigator.maxTouchPoints
is if the user wants to detect a touch screen. So it would be sufficient to always return a value of 1 while simulating a touch device. Of course, this would be untrue for many modern devices so another option is to add a "maxTouchPoints" property to the phone device object. Though this would mean modifying Mozilla's CDN for simulated devices to have the actual values (which could be more work than it's worth).
Martin, do you think we can do what Chrome DevTools is doing and fake the navigator.maxTouchPoints
value to be 1 for all simulated devices until we have a better way of getting the actual device's max touchpoints value?
Comment 5•5 years ago
|
||
Let's go with faking a value of 1
for every device that is marked as touch device in our dataset.
I researched the sources we usually utilize to get device specs and non of them includes information about maxTouchPoints
. So I guess that we have to live with a less accurate approach. The main use case will still work, and maybe we can improve this in the future.
Reporter | ||
Comment 6•5 years ago
|
||
while theoretically maxTouchPoints
could be also be used to check for the (very rare, probably) situation where a device supports only one touch point, but is not multi-touch/two-finger-swipe capable, faking a value of 1
does indeed sound like a reasonable approximation (and yes it's still what Chrome fakes too).
Assignee | ||
Comment 7•5 years ago
|
||
Assignee | ||
Comment 8•5 years ago
|
||
Assignee | ||
Comment 9•5 years ago
|
||
Comment 10•5 years ago
|
||
Comment 11•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d077dd49d224
https://hg.mozilla.org/mozilla-central/rev/8b53b0098b6b
https://hg.mozilla.org/mozilla-central/rev/8ed14f008aa6
Description
•