From cc3598cd0830ac9be5d3534abc3775d22db7dea7 Mon Sep 17 00:00:00 2001 From: Manuel Martin Date: Thu, 19 Mar 2020 15:20:53 +0100 Subject: [PATCH] Reset the touch when the action is cancelled --- .../shared/org/mozilla/vrbrowser/input/MotionEventGenerator.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/common/shared/org/mozilla/vrbrowser/input/MotionEventGenerator.java b/app/src/common/shared/org/mozilla/vrbrowser/input/MotionEventGenerator.java index 553c9b0ec..e1e904c76 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/input/MotionEventGenerator.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/input/MotionEventGenerator.java @@ -104,6 +104,7 @@ public static void dispatch(Widget aWidget, int aDevice, boolean aFocused, boole if (!aPressed && (device.mPreviousWidget != null) && (device.mPreviousWidget != aWidget)) { if (device.mWasPressed) { generateEvent(device.mPreviousWidget, device, aFocused, MotionEvent.ACTION_CANCEL, false); + device.mTouchStartWidget = null; device.mWasPressed = false; } generateEvent(device.mPreviousWidget, device, aFocused, MotionEvent.ACTION_HOVER_EXIT, true, device.mMouseOutCoords);