Last Comment Bug 719240 - Don't dispatch touchmove events if the user's finger hasn't moved far
: Don't dispatch touchmove events if the user's finger hasn't moved far
Status: RESOLVED FIXED
:
Product: Firefox for Android
Classification: Client Software
Component: General (show other bugs)
: unspecified
: All All
: -- normal (vote)
: Firefox 12
Assigned To: Wesley Johnston (:wesj)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-18 14:32 PST by Wesley Johnston (:wesj)
Modified: 2013-12-10 10:00 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
fixed


Attachments
Patch (3.70 KB, patch)
2012-01-18 14:32 PST, Wesley Johnston (:wesj)
mark.finkle: review+
doug.turner: approval‑mozilla‑aurora+
Details | Diff | Splinter Review

Description Wesley Johnston (:wesj) 2012-01-18 14:32:16 PST
Created attachment 589652 [details] [diff] [review]
Patch

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.
Comment 1 Mark Finkle (:mfinkle) (use needinfo?) 2012-01-18 14:56:59 PST
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.
Comment 3 :Ms2ger (⌚ UTC+1/+2) 2012-01-25 07:16:43 PST
https://hg.mozilla.org/mozilla-central/rev/1b16c4bd7aa2
Comment 4 Brad Lassey [:blassey] (use needinfo?) 2012-01-27 23:31:08 PST
Wes, please request aurora approval
Comment 5 Wesley Johnston (:wesj) 2012-01-28 07:15:18 PST
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
Comment 6 Wesley Johnston (:wesj) 2012-02-06 18:31:25 PST
https://hg.mozilla.org/releases/mozilla-beta/rev/105917581955

Note You need to log in before you can comment on or make changes to this bug.