Mousemove effects appear unexpectedly on touch devices with synthMouseMove pref enabled
Categories
(Core :: DOM: Events, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox141 | --- | fixed |
People
(Reporter: kats, Assigned: masayuki)
References
Details
Attachments
(3 files, 2 obsolete files)
Filing this per https://bugzilla.mozilla.org/show_bug.cgi?id=1545393#c8
Currently the layout.reflow.synthMouseMove pref is enabled on Android, which results in unexpected (from a user's point of view) effects on touch devices. These include hover/mouseover effects being "pinned" to the screen position of the last tap after scrolling. STR can be seen here:
https://github.com/mozilla-mobile/fenix/issues/8779
https://github.com/mozilla-mobile/fenix/issues/9860
https://github.com/mozsearch/mozsearch/pull/308#issue-408060050
I plan to turn this pref back off on Android/Fenix, but filing this bug per Makoto's request in case there are other things we can do in Gecko to turn the pref back on without having these unexpected effects.
| Reporter | ||
Comment 1•6 years ago
|
||
Note that this effect can be reproduced on Windows touchscreen tablets too, so it affects current desktop releases.
Updated•6 years ago
|
| Assignee | ||
Comment 2•1 year ago
|
||
Well, in Pointer Events, pointer boundary events should be fired when the element underneath the pointer is changed by a layout change if and only if the pointer is hoverable. So, I think that we should enable the pref on Android but make PresShell stop dispatching it for touch. I'll take a look this too when I work on bug 1967878.
| Comment hidden (obsolete) |
| Assignee | ||
Comment 4•1 year ago
|
||
We should enable synthesized eMouseMove on Android too for consistency
between platforms.
| Assignee | ||
Comment 5•1 year ago
|
||
When APZ starts handling pan or some other gesture, ePointerCancel
is dispatched to notify web apps of end of normal touch input.
Therefore, we can use this event to forget the last mouse cursor
position which was set by eMouseMove of the compatibility mouse
events after a single tap. Then, we can prevent unexpected :hover
state changes after the element underneath the mouse cursor is changed
by a scroll caused by a swipe.
Updated•1 year ago
|
| Comment hidden (obsolete) |
Updated•1 year ago
|
| Assignee | ||
Comment 7•1 year ago
|
||
I realized that after enabling the synthesized mousemove on Android debug builds (except in the xorigin mode), test_bug426082.html starts failing frequently. There is an intermittent failure bug for the test. According to the latest log, it occurred only on Wayland builds mostly only on debug builds. So, I guess this is caused by a race.
The failures on Android are these lines. I logged the mouseover event whose default handler updates the :hover state. Then, after synthesizing mousedown on the <label>, mouseover is fired on <html>. (Before that, the test synthesizes mousemove on the <label> first, then, mouseover is fired on the <label> as expected.)
Currently, we don't dispatch mouse boundary events at handling eMouseDown. So, the unexpected mouseover is fired by a synthesized eMouseMove which is fired within the next animation frame. The position should be stored by the last eMouseDown by the root PresShell and the synthesized eMouseMove is fired at the stored position.
Even if I set the viewport, I couldn't fix this.
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
Ikezoe-san, do you have any ideas what could happen around dispatching mousedown on Android?
| Assignee | ||
Comment 8•1 year ago
|
||
Oh, perhaps, this is not an issue of the test. It passes in the verify mode. So, I guess a mousemove came from the parent process or somewhere else.
| Assignee | ||
Comment 9•1 year ago
|
||
| Assignee | ||
Comment 10•1 year ago
|
||
With enabling the synthesize eMouseMove on Android,
test_bug426082.html starts failing frequently. The reason is, it
checks the :hover state of elements which is target of its synthesized
mouse events. However, an unexpected mousemove event may be fired
on the document.
The unexpected mousemove came from the parent process and its
preceding test, test_bug422132.html enables async event dispatching
and synthesizes wheel events. Therefore, this patch makes the test
wait for no pending mouse events with synthesizing a click before
finish.
Comment 11•1 year ago
|
||
Comment 12•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/589006a502fe
https://hg.mozilla.org/mozilla-central/rev/1c859a558651
https://hg.mozilla.org/mozilla-central/rev/1d959c83f775
Updated•1 year ago
|
Description
•