The media query change is not detected automatically when activating/deactivating the touchscreen on DELL OptiPlex 9020 AIO

VERIFIED FIXED in Firefox 64

Status

()

defect
P3
normal
VERIFIED FIXED
7 months ago
7 months ago

People

(Reporter: danibodea, Assigned: hiro)

Tracking

Trunk
mozilla64
Desktop
Windows
Points:
---

Firefox Tracking Flags

(firefox64 verified)

Details

Attachments

(2 attachments)

(Reporter)

Description

7 months ago
[Note]:
- When activating/deactivating the touchscreen while the test page (https://hiikezoe.github.io/interaction-media-features.html) is opened, the changes are not seen automatically; A page refresh has to be done.

[Affected versions]:
- v64.0a1

[Affected platforms]:
- Windows

[Steps to reproduce]:
Precondition 1: Enable the touch-screen of the touch-screen capable device (like Microsoft Surface), tutorial here: 
https://support.microsoft.com/en-us/help/4028019/windows-enable-and-disable-your-touchscreen-in-windows-10
Precondition 2: Connect a mouse to the device.
1. Lunch the browser and open page: 
https://hiikezoe.github.io/interaction-media-features.html
2. Disable the touchscreen of the device from the Device Manager.

[Expected result]:
- The content of the page changes to match the recognized pointing devices automatically.

[Actual result]:
- The content of the page DOES NOT change automatically! (However, it does change after a page refresh.)

[Additional notes]:
- This issue does not occur in the case of the Microsoft Surface tablet.
- The touchscreen "device" is differently recognized in the device manager, compared to the Microsoft Surface tablet.
- The mouse's connection and disconnection is recognized automatically.
(Reporter)

Updated

7 months ago
Blocks: 1035774
Flags: needinfo?(hikezoe)
(Assignee)

Comment 2

7 months ago
Bodea, thanks for the detailed report!

Given the fact the touchscreen on the OptiPlex 9020 is not recognized as a mouse type device, we might also need to watch other device types in InputDeviceUtils::RegisterNotification [1]. Maybe GUID_DEVINTERFACE_HID?

[1] https://hg.mozilla.org/mozilla-central/file/ddcd7cc2f3cd/widget/windows/InputDeviceUtils.cpp#l26
Flags: needinfo?(hikezoe)
Priority: -- → P3
(Assignee)

Comment 3

7 months ago
Hey Bodea, could you please this binary on the OptiPlex 9020 AIO?

https://treeherder.mozilla.org/#/jobs?repo=try&revision=84214e868aa78b3e6dfcb5149800ad877938e064
Flags: needinfo?(daniel.bodea)
(Reporter)

Comment 4

7 months ago
Hey Hiro, I have tried this binary on the problematic DELL device and it seems that the issue is fixed. The test page automatically detects the activation/deactivation of the touchscreen when using that build.
I have also performed a quick regression test on the Surface to be sure it didn't cause any new issues and it's OK.
Flags: needinfo?(daniel.bodea)
(Assignee)

Comment 5

7 months ago
Great! Thank you, Bodea!
Assignee: nobody → hikezoe
Status: NEW → ASSIGNED
(Assignee)

Comment 6

7 months ago
It seems some touchscreen devices are recognized as an HID not a mouse, so
for such devices we need to use GUID_DEVINTERFACE_HID instead.

I've confirmed that WM_DEVICECHANGE is received when a mouse is
connected/disconnected on a Thinkpad even if we use GUID_DEVINTERFACE_HID here.

Comment 7

7 months ago
Pushed by hikezoe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ddb585f4d9d7
Watch GUID_DEVINTERFACE_HID device changes instead of GUID_DEVINTERFACE_MOUSE. r=masayuki

Comment 8

7 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/ddb585f4d9d7
Status: ASSIGNED → RESOLVED
Last Resolved: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
(Reporter)

Comment 9

7 months ago
This fix was verified on DELL OptiPlex 9020 AIO device. The activation and deactivation of the touchscreen are now detected automatically by the test page, no refresh needed. 
Bug verified. Thank you!
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.