Bug 197773
| Summary: | [GTK] Touchscreen detection false positive | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ryan DeBeasi <hi> |
| Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | bugs-noreply, cgarcia, mcatanzaro |
| Priority: | P3 | Keywords: | Gtk |
| Version: | Other | ||
| Hardware: | PC | ||
| OS: | Linux | ||
Ryan DeBeasi
WebKitGTK is detecting a touch screen on my device, even though I don't have a touch screen. I'm not seeing this behavior on Firefox or Chrome. I'm running GNOME Web 3.28.1 on Elementary OS Juno (Ubuntu 18.04.2 LTS) on a Dell XPS 13 (9343).
To reproduce:
1. Open GNOME Web on a device that does not have a touchscreen.
2. Open the browser developer tools.
3. Go to Console.
4. Type `window.matchMedia("(any-pointer:coarse)").matches`.
5. `true` appears.
Following the same steps in Firefox or Chrome produces `false`.
Alternately, this page also reproduces the problem: https://patrickhlauke.github.io/touch/touchscreen-detection/
Potential related issue: https://bugs.webkit.org/show_bug.cgi?id=144765
Thank you!!
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Carlos Garcia Campos
*** This bug has been marked as a duplicate of bug 139681 ***
Michael Catanzaro
Are you sure this is a duplicate that would be fixed by bug #139681? This isn't about touch events, this is about window.matchMedia().
Carlos Garcia Campos
Yes, window.matchMedia("(any-pointer:coarse)").matches is false when building with touch events disabled.