Bug 197773 - [GTK] Touchscreen detection false positive
Summary: [GTK] Touchscreen detection false positive
Status: RESOLVED DUPLICATE of bug 139681
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: Other
Hardware: PC Linux
: P3 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2019-05-10 07:34 PDT by Ryan DeBeasi
Modified: 2019-05-22 07:19 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan DeBeasi 2019-05-10 07:34:43 PDT
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!!
Comment 1 Carlos Garcia Campos 2019-05-22 04:12:09 PDT

*** This bug has been marked as a duplicate of bug 139681 ***
Comment 2 Michael Catanzaro 2019-05-22 06:31:43 PDT
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().
Comment 3 Carlos Garcia Campos 2019-05-22 07:19:15 PDT
Yes, window.matchMedia("(any-pointer:coarse)").matches is false when building with touch events disabled.