Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(833)

Unified Diff: ui/android/java/src/org/chromium/ui/base/EventForwarder.java

Issue 2851473006: chrome/android: Consume down events for mouse drag gesture. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/java/src/org/chromium/ui/base/EventForwarder.java
diff --git a/ui/android/java/src/org/chromium/ui/base/EventForwarder.java b/ui/android/java/src/org/chromium/ui/base/EventForwarder.java
index 152e5b92be21ccc320a1042722aaa5a488a15615..2d79dbd9e534cbdcf01b6f455340ed0f7e7640dd 100644
--- a/ui/android/java/src/org/chromium/ui/base/EventForwarder.java
+++ b/ui/android/java/src/org/chromium/ui/base/EventForwarder.java
@@ -190,7 +190,10 @@ public class EventForwarder {
// and ACTION_BUTTON_RELEASE respectively because they provide
// info about the changed-button.
if (eventAction == MotionEvent.ACTION_DOWN || eventAction == MotionEvent.ACTION_UP) {
- return false;
+ // While we use the action buttons for the changed state it is important to still
+ // consume the down/up events to get the complete stream for a drag gesture, which
+ // is provided using ACTION_MOVE touch events.
+ return true;
}
nativeOnMouseEvent(mNativeEventForwarder, event.getEventTime(), eventAction,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698