[Bug] Two finger scrolling on touchpad opens link dialog
Categories
(GeckoView :: General, defect)
Tracking
(firefox94 fixed)
Tracking | Status | |
---|---|---|
firefox94 | --- | fixed |
People
(Reporter: kbrosnan, Assigned: m_kato)
References
Details
Attachments
(2 files, 1 obsolete file)
From github: https://github.com/mozilla-mobile/fenix/issues/20100.
Steps to reproduce
- Open a page with many links, e.g., https://en.wikipedia.org/wiki/Firefox
- Scroll with 2 fingers on touch pad until the pointer end up resting on a link.
- Remove both fingers.
- Then use a single finger on the touch pad to move the pointer a little but leave it pointing at a link when you lift your finger.
Expected behavior
Expectation is that the pointer simply is on the link but no clicking has occurred.
Actual behavior
Unwanted click is generated.
Device information
- Device vendor / model and Android version: Lenovo Chromebook Duet running Chrome OS 93.0.4543.0 (Android 9)
- Firefox for Android version: 91.0a1 (Build #2015817099)
Originally reported at https://github.com/mozilla-mobile/fenix/issues/3708#issuecomment-817533421 by @dchee2. CC @makotokato.
Change performed by the Move to Bugzilla add-on.
Updated•3 years ago
|
Comment 1•3 years ago
|
||
This is the first I hear of someone using Firefox for Android on a device with a touchpad (a Chromebook in this case).
It's not particularly surprising that this scenario is poorly supported.
Comment 3•3 years ago
|
||
Hey Kevin, a few questions for the GeckoView team:
- Is this use case (running Firefox for Android on a Chromebook) considered to be supported?
- If so, has there been previous development work specific to Chromebooks done in the past, or has this scenario just largely worked out of the box?
- If so, is there someone on the GV team who has access to a Chromebook and may be able to help us investigate and fix this?
Reporter | ||
Comment 4•3 years ago
|
||
- About 5% of our users are on Chromebooks.
- very little specific Chromebook work has been done. In 89 there was a behavior change bug 1561927. That made scrolling not select text.
- Redirect to Emily about Chromebook owners on her team.
Assignee | ||
Comment 5•3 years ago
•
|
||
My Chromebook has no touch panel (Lenovo S330. Trackpad only), but I cannot reproduce this... Hmm
Assignee | ||
Comment 6•3 years ago
|
||
Ah, I can reproduce this now on Lenovo S330.
Comment 7•3 years ago
|
||
Makoto, would you be able to work on this? Or will you provide information to diagnose/investigate this issue without Chromebooks? From the perspective of APZ stand point, MOZ_LOG="apz.inputstate:5,apz.inputqueue:5" would be a start point (the log will be pointless if the issue is underlying in ChromeOS or in GeckoView).
Assignee | ||
Comment 8•3 years ago
|
||
Comment 9•3 years ago
|
||
Thanks for the log. So a suspicious point is;
D/apz.inputqueue injecting new touch block ae047780 with id 15 and target b0e72000
D/apz.inputqueue scheduling main thread timeout for target b0e72000
D/apz.inputqueue got a content response; block=13 preventDefault=0
D/apz.inputqueue got a content response; block=15 preventDefault=1
Looks like the single finger movement were interpreted to a long press.
Assignee | ||
Comment 10•3 years ago
|
||
Chrome for Android on Chrome OS doesn't seems to assign longtap, so I cannot confirm whether this occurs on Chrome for Android on Chrome OS..
Comment 11•3 years ago
|
||
I've reviewed some of the background here (such as bug 1561927, its fix, the Chrome issue it links to, and the above APZ logs), and will try to summarize my understanding.
The first important observation here is in this configuration (Android on Chromebook) touchpad scrolls generate touch events.
That's not what happens on desktop platforms, where our widget code turns touchpad scrolls into pan gesture events.
On Windows, we do have a few devices whose touchpads produce touch events with two touch points. These are problematic for general scrolling, so we have a workaround where we turn them into pan gesture events (see bug 1511901 for details).
In this case, it looks like, at the Android system level, touchpad scrolling generates MotionEvent
s with a single pointer, which our widget code then turns into touch events with a single touch point.
The issue in bug 1561927 was that GeckoView sometimes turns motion events into mouse events, and it was doing so for touchpad scrolls (and the mouse events then caused text selection). The fix for that bug tries to detect the touchpad scroll case and turn them into touch events in that case.
Now, in this bug, we are observing that the user performs a one-finger touchpad movement:
Then use a single finger on the touch pad to move the pointer a little but leave it pointing at a link when you lift your finger.
which then triggers a link click.
The logs indicate the link click is the result of a long tap. This suggests the one-finger touchpad movement is still generating touch events. (The long tap then occurs because we have a tolerance threshold where if the finger does not move far away from the touch-start point, we consider it a tap rather than a touch-drag. This is consistent with the user moving the pointer "a little".)
To test this theory: Makoto, could you please check if one-finger touchpad movements can be used for scrolling?
If yes, I think we may want to change GeckoView to stop turning one-fnger touchpad movements into touch events, and turn them into mouse moves instead (without a mouse-down/mouse-up at the beginning/end).
If not, then we need to understand why the touch events do not trigger scrolling (additional logs with apz.controller:5
also included would be helpful in this case).
Updated•3 years ago
|
Assignee | ||
Comment 12•3 years ago
|
||
Assignee | ||
Comment 13•3 years ago
|
||
To test this theory: Makoto, could you please check if one-finger touchpad movements can be used for scrolling?
Chromebook has no configuration to use one-finger scroll setting.
I attached new log with apz.controller and gesture. Also, when using debug build, the following warning is outputted.
09-07 17:20:14.527 9547 9547 I Gecko : [Parent 9547, Unnamed thread bea34000] WARNING: Unhandled state upon single touch start: file /mozilla/mobile-aarch64/gfx/layers/apz/src/GestureEventListener.cpp:199
09-07 17:20:15.030 9580 9614 I Gecko : [Child 9580, Main Thread] WARNING: Got an unexpected touchend: file /mozilla/mobile-aarch64/gfx/layers/apz/util/TouchCounter.cpp:58
Comment 14•3 years ago
|
||
(In reply to Makoto Kato [:m_kato] from comment #13)
I attached new log with apz.controller and gesture.
Thanks, though what I'm looking for is a log during a one-finger touchpad movement (I'd like to understand why it does not cause scrolling, if it's generating touch events). Any chance you could get one like that?
Also, when using debug build, the following warning is outputted.
09-07 17:20:14.527 9547 9547 I Gecko : [Parent 9547, Unnamed thread bea34000] WARNING: Unhandled state upon single touch start: file /mozilla/mobile-aarch64/gfx/layers/apz/src/GestureEventListener.cpp:199 09-07 17:20:15.030 9580 9614 I Gecko : [Child 9580, Main Thread] WARNING: Got an unexpected touchend: file /mozilla/mobile-aarch64/gfx/layers/apz/util/TouchCounter.cpp:58
This is suspicious, and seems to stem from:
D/apz.gesture Receiving event type 0 with 1 touches in state 5
but I'm unsure how we got into that state (would need to see what comes before in the log).
Assignee | ||
Comment 15•3 years ago
|
||
Ah, I may understand this after I debug this today.
After two-finger scroll is finished, when user taps trackpad, Android VM on Chrome OS tried to start more scroll event unfortunately, But then, it fires touch cancel event immediately. GV (not APZ) doesn't consider this situation.
Comment 16•3 years ago
|
||
(In reply to Makoto Kato [:m_kato] from comment #15)
After two-finger scroll is finished, when user taps trackpad, Android VM on Chrome OS tried to start more scroll event unfortunately, But then, it fires touch cancel event immediately. GV (not APZ) doesn't consider this situation.
This confuses me that why the same symptom doesn't happen on Chrome. Does Chrome handle the case?
Comment 17•3 years ago
|
||
Anyway moving to GeckoView as per comment 15.
Assignee | ||
Comment 18•3 years ago
|
||
(In reply to Hiroyuki Ikezoe (:hiro) from comment #16)
(In reply to Makoto Kato [:m_kato] from comment #15)
After two-finger scroll is finished, when user taps trackpad, Android VM on Chrome OS tried to start more scroll event unfortunately, But then, it fires touch cancel event immediately. GV (not APZ) doesn't consider this situation.
This confuses me that why the same symptom doesn't happen on Chrome. Does Chrome handle the case?
Yes, now. It seems to be https://crbug.com/1199635.
Comment 19•3 years ago
|
||
Huh, it got resolved just before we got this issue report. That's unfortunate. :/
Assignee | ||
Comment 20•3 years ago
|
||
This will be a bug of Android VM on Chrome OS.
When touching trackpad, Android VM on Chrome OS might fire scroll event for
trackpad, then, it fires cancel event immediately.
Actually, since we don't consider this situation, APZ detects that this is
log tap unfortunately.
So we should dispatch ACTION_CANCEL as scroll event.
Comment 21•3 years ago
|
||
(In reply to Makoto Kato [:m_kato] from comment #15)
Ah, I may understand this after I debug this today.
After two-finger scroll is finished, when user taps trackpad, Android VM on Chrome OS tried to start more scroll event unfortunately, But then, it fires touch cancel event immediately. GV (not APZ) doesn't consider this situation.
Thanks for tracking this down!
Comment 22•3 years ago
|
||
Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/af5dd029bcc2 Handle ACTION_CANCEL for TrackPad scroll. r=geckoview-reviewers,agi
Comment 23•3 years ago
|
||
bugherder |
Description
•