Second click is ignored if fast and in a different spot in Fenix
Categories
(Core :: Panning and Zooming, defect, P2)
Tracking
()
People
(Reporter: jaume, Assigned: botond)
Details
(Whiteboard: [fennec68.3])
Attachments
(2 files, 1 obsolete file)
1.16 KB,
text/html
|
Details | |
47 bytes,
text/x-phabricator-request
|
lizzard
:
approval-mozilla-esr68+
|
Details | Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0
Steps to reproduce:
Given a mobile friendly site (<meta name="viewport" content="width=device-width, initial-scale=1"> or touch-action: manipulation;
), when two taps happen in different parts of the screen in a small time frame, the second one is ignored and not treated as a click.
I have attached a minimal test html file (which is also uploaded at https://www.cosarara.me/jaume/ff.html ), where you can tap any of the two elements as fast as you want and clicks will always register (as long as you keep tapping the same spot), but if you alternate between the two elements, only the taps on one of them register.
You can also use the same element with different fingers to the same effect, proving this is not a matter of different elements but simply distance.
If you slow down leaving over 350ms between clicks, both will register.
Actual results:
touchstart
and touchend
events always fire, but the second click event does not.
Expected results:
Both clicks should fire, like it would happen if both were done on the same spot.
Ignoring the event makes firefox seem slow and unresponsive.
This works as expected on desktop firefox using a mouse, and also tapping on firefox focus (8.0.16) and chrome for android 77.0.
It fails the same way on Firefox Preview v2.0.0 package 12.0.0 gecko 7.0.
Comment 1•5 years ago
|
||
I have managed to reproduce your issue on Release 68.1.1 and Nightly 68.2a1 (2019-10-05) using a Samsung Galaxy S8+ (Android 8.0.0). I will set this issue as new.
Comment 2•5 years ago
|
||
I have also managed to reproduce the issue on Firefox Preview and submitted a separate issue: https://github.com/mozilla-mobile/fenix/issues/5844.
Comment 3•5 years ago
|
||
Asking the GV team to triage this as this may be platform related.
Comment 4•5 years ago
|
||
Randall says that is an APZ issue and should be moved to the graphics component.
Comment 5•5 years ago
|
||
Moving to APZ component
Updated•5 years ago
|
Reporter | ||
Comment 6•5 years ago
|
||
Just to clarify, this is in both Fenix and Fennec (although maybe the fix will never reach the later).
Comment 7•5 years ago
|
||
Looks like we unconditionally go into the one-touch-pinch code which doesn't do anything on this page (since it cannot be zoomed), and probably prevents us from firing the click.
Not sure what the best way to handle this is, maybe we need to check if zooming is possible and if not, just handle the second touch as a regular touch down without one-touch-pinch.
Comment 8•5 years ago
|
||
The priority flag is not set for this bug.
:botond, could you have a look please?
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 9•5 years ago
•
|
||
I haven't had a chance to confirm the diagnosis or investigate further yet, but I plan to. Will park the bug with me in the meantime.
Assignee | ||
Comment 10•5 years ago
|
||
(In reply to Kartikaya Gupta (email:kats@mozilla.com) (away until Feb-2020) from comment #7)
Looks like we unconditionally go into the one-touch-pinch code which doesn't do anything on this page (since it cannot be zoomed), and probably prevents us from firing the click.
I don't think this is the problem, because the linked code is in HandleInputTouchMove()
, but the issue occurs even if only touch-star / touch-end events are involved.
Assignee | ||
Comment 11•5 years ago
|
||
Rather, it appears the problem is that if a second tap is close enough in time to be a double-tap (i.e. we're still in the GESTURE_FIRST_SINGLE_TOUCH_UP
state) but far in distance, we bail by setting the state to GESTURE_NONE
, which prevents that second tap from triggering a gesture event such as a single-tap.
Assignee | ||
Comment 12•5 years ago
|
||
Assignee | ||
Comment 13•5 years ago
|
||
Depends on D51479
Comment 14•5 years ago
|
||
Pushed by bballo@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7cec59e15970 If two taps are close in time but far in distance, still allow the second one to start a gesture. r=tnikkel https://hg.mozilla.org/integration/autoland/rev/8aa8ed80ea43 Add a gtest. r=tnikkel
Comment 15•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/7cec59e15970
https://hg.mozilla.org/mozilla-central/rev/8aa8ed80ea43
Comment 16•5 years ago
|
||
Since the status are different for nightly and release, what's the status for beta?
For more information, please visit auto_nag documentation.
Assignee | ||
Updated•5 years ago
|
Reporter | ||
Comment 17•5 years ago
|
||
I have applied the patch on fennec esr68 and it works perfectly. Will it be officially backported there?
Assignee | ||
Comment 18•5 years ago
|
||
(In reply to Jaume Delclòs Coll from comment #17)
I have applied the patch on fennec esr68 and it works perfectly.
Great, thanks for checking!
Will it be officially backported there?
I think the patch is small and low-risk enough to backport. I would like to give it a chance to bake on nightly for a week or two first.
Assignee | ||
Comment 19•5 years ago
|
||
Comment on attachment 9105919 [details]
Bug 1586496 - If two taps are close in time but far in distance, still allow the second one to start a gesture. r=tnikkel
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration: To make the fix available to users of Fennec which is on the 68esr branch
- User impact if declined: A tap may be ignored if it's close in time to a previous tap (but far enough in distance not to be a double-tap)
- Fix Landed on Version: 72
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Small, localize changed to APZ gesture handling code
- String or UUID changes made by this patch:
Assignee | ||
Updated•5 years ago
|
Comment 20•5 years ago
|
||
Comment on attachment 9105919 [details]
Bug 1586496 - If two taps are close in time but far in distance, still allow the second one to start a gesture. r=tnikkel
OK for uplift, useful fix for Fennec.
Comment 21•5 years ago
|
||
bugherder uplift |
Comment 22•5 years ago
|
||
Had landed the test with a=test-only and there were bustages after the header conflict got 'fixed'. Backout:
https://hg.mozilla.org/releases/mozilla-esr68/rev/4e0eded29ce39f15d1d40463d15ba13ed9468dda
Assignee | ||
Comment 23•5 years ago
|
||
It looks like the test would need to be rebased across the prefs refactor to apply cleanly. We could do that, but I think the incremental value of having the test run on the esr68 branch is low enough that we can just leave it backed out. Thanks!
Updated•5 years ago
|
Updated•5 years ago
|
Comment 24•5 years ago
|
||
I have tested the issue on 68.3.0 RC using a Google Pixel 3a (Android 9) and Google Pixel 3 XL (Android 9) and the issue no longer occurs.
Description
•