clicks are transmitted when panning

VERIFIED FIXED

Status

()

Firefox for Android
General
P1
major
VERIFIED FIXED
6 years ago
6 years ago

People

(Reporter: fabrice, Assigned: fabrice)

Tracking

unspecified
All
Android
Points:
---

Firefox Tracking Flags

(firefox11 fixed, fennec11+)

Details

Attachments

(3 attachments)

(Assignee)

Description

6 years ago
That makes browsing quite difficult ;)
(Assignee)

Comment 1

6 years ago
Created attachment 573429 [details] [diff] [review]
patch

That seems to work fine here, but the constants at least probably need some tweaking.
Assignee: nobody → fabrice
Attachment #573429 - Flags: review?(pwalton)
Comment on attachment 573429 [details] [diff] [review]
patch

Review of attachment 573429 [details] [diff] [review]:
-----------------------------------------------------------------

::: embedding/android/gfx/LayerController.java
@@ +298,5 @@
> +            Log.i("Gecko", "Setting mLastEvent");
> +            mLastX = event.getRawX();
> +            mLastY = event.getRawY();
> +            mLastTime = event.getEventTime();
> +        }

This duplicates some logic that the pan/zoom controller already has. I think it'd be better to move this logic to a new method PanZoomController.shouldCallTouchListener(). It can possibly be as simple as:

return mState == PANNING || mState == PANNING_HOLD || mState == PINCHING;

Then just have the LayerController call that method on mPanZoomController to determine whether to call the touch listener.
Attachment #573429 - Flags: review?(pwalton) → review-
Created attachment 573532 [details] [diff] [review]
Temp fix for click while panning

Was discussing this somewhat with wesj yesterday. I had a patch for this that I was using locally that I think is a good temporary fix for this issue, until wesj revisits this code for touch events.
Attachment #573532 - Flags: review?(pwalton)
(In case it's not clear why the patch works, it's because the PanZoomController's onTouchEnd returns true after a pan. This effectively eats the touch-up event, and so what gecko gets is just the touch-down, which is not sufficient for a click. Without a pan, however, it gets both touch-up and touch-down and so triggers a click).
Comment on attachment 573532 [details] [diff] [review]
Temp fix for click while panning

Review of attachment 573532 [details] [diff] [review]:
-----------------------------------------------------------------

Clever!

r+ with a comment that explains that this is temporary.
Attachment #573532 - Flags: review?(pwalton) → review+
Priority: -- → P1
Just as an update, there is an issue with my patch which makes it really hard to click on links sometimes. I believe this happens because even a one-pixel movement between the touch-down and touch-up will send the PanZoomController into pan mode and kill the click. The best way to fix this (and which would be good in general) is to have a movement threshold in the PanZoomController below which a pan doesn't actually get started (e.g. you need to drag 3-4 pixels before it starts panning). I can do this in a separate patch.
Created attachment 574290 [details] [diff] [review]
Add a pan thresold
Attachment #574290 - Flags: review?(pwalton)
Comment on attachment 574290 [details] [diff] [review]
Add a pan thresold

Review of attachment 574290 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM
Attachment #574290 - Flags: review?(pwalton) → review+
http://hg.mozilla.org/projects/birch/rev/ce4ebd1d2c9f
http://hg.mozilla.org/projects/birch/rev/6da7470b607c
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Verified fixed on:
Mozilla/5.0 (Android;Linux armv7l;rv:11.0a1)Gecko/20111116
Firefox/11.0a1 Fennec/11.0a1
Devices: Motorola Droid 2
OS: Android 2.3.3
Status: RESOLVED → VERIFIED
tracking-fennec: --- → 11+
status-firefox11: --- → fixed
You need to log in before you can comment on or make changes to this bug.