Closed Bug 719240 Opened 12 years ago Closed 12 years ago

Don't dispatch touchmove events if the user's finger hasn't moved far

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(firefox11 fixed)

RESOLVED FIXED
Firefox 12
Tracking Status
firefox11 --- fixed

People

(Reporter: wesj, Assigned: wesj)

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
Follow up to Bug 603008. Google Maps expects that we don't dispatch touchmove events if the users finger hasn't moved much, and uses this to detect taps (and double taps). This brings us in line with their expectations.
Attachment #589652 - Attachment is patch: true
Attachment #589652 - Flags: review?(mark.finkle)
Comment on attachment 589652 [details] [diff] [review]
Patch

>+        if (initialTouchLocation != null && (action & MotionEvent.ACTION_MASK) == MotionEvent.ACTION_MOVE) {
>+            if (PointUtils.subtract(point, initialTouchLocation).length() > PanZoomController.PAN_THRESHOLD * 240) {
>+                initialTouchLocation = null;
>+            } else {
>+                return !allowDefaultActions;
>+            }
>+        }

Is this location for setting initialTouchLocation = null good enough? I worry that something could happen and we are stuck in a non-null situation. It looks like it should be good enough, I just wanted you to think about it a bit more.
Attachment #589652 - Flags: review?(mark.finkle) → review+
https://hg.mozilla.org/mozilla-central/rev/1b16c4bd7aa2
Assignee: nobody → wjohnston
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → Firefox 12
tracking-fennec: --- → ?
Wes, please request aurora approval
Comment on attachment 589652 [details] [diff] [review]
Patch

User impact if declined: No multitouch
Testing completed (on m-c, etc.): On mc since 1/24
Risk to taking this patch (and alternatives if risky): Low risk. Mobile only. Currently disabled
Attachment #589652 - Flags: approval-mozilla-aurora?
Attachment #589652 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
tracking-fennec: ? → ---
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: