Mouse drag selection broken on Android |
|||||||
Issue description1) Plug in a physical mouse to a Nexus 6P via USB-C hub or bluetooth. 2) Visit http://en.wikipedia.org/ 3) Drag on top of text. Expected: Text becomes selected blue. Actual: Nothing happens. Exactly bisected to http://crrev.com/459942 "chrome/android: Remove EdgeSwipeEventHandler." I've also noted by logging on a ToT build that no MotionEvents are sent to the ContentView during the drag. So this seemingly unrelated handler must've had a useful side effect on mouse events.
,
Apr 25 2017
After locally reverting, I notice the reason it worked before is that an ACTION_MOVE MotionEvent is sent up to LayoutManager.propagateEvent, and from there to ContentView.onTouchEvent.
,
Apr 25 2017
This looks like a weird android issue. I tried this on ContentShell and I don't see the drag working there as well, which shouldn't be affected by this change. The quick solution would be to always intercept the event and forward it to the ContentView, similar to what the EdgeSwipeEventHandler was doing.
,
Apr 25 2017
Hmm, does this also mean mouse drag selection never worked in WebView, even in M58?
,
Apr 25 2017
Tried WebView on ToT and 58, it doesn't work on either. So looks like just having the Layout code route events directly to the ContentView was somehow keeping this working in Chrome.
,
Apr 25 2017
what's the real problem though, in webview or content shell? onGenericMotionEvent is hooked up correctly afaict?
,
Apr 25 2017
Its in content. I think we are rejecting the down event somewhere so we don't get the rest of the move events. The EventFilter code that was deleted would dispatch the event to content view but always return true for it, irrespective of whether the content view consumed it or not.
,
Apr 25 2017
ok, so I guess revert for m59, but should fix the real issue on trunk
,
Apr 25 2017
Its this code: https://cs.chromium.org/chromium/src/ui/android/java/src/org/chromium/ui/base/EventForwarder.java?l=160 Just removing that if check makes it work.
,
Apr 25 2017
Still doesn't work on WebView though. :/
,
Apr 27 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6bc101ebf27a7a56f28d5264aed265ec43a8db45 commit 6bc101ebf27a7a56f28d5264aed265ec43a8db45 Author: khushalsagar <khushalsagar@chromium.org> Date: Thu Apr 27 20:46:04 2017 chrome/android: Consume down events for mouse drag gesture. Mouse drag gestures on android are delivered using a stream of ACTION_MOVE events. If the view does not consume the ACTION_DOWN event that starts the gesture, it will not receive the following move events. Consume this event in the EventForwarder to ensure the ContentView gets the complete gesture. BUG= 714845 Review-Url: https://codereview.chromium.org/2842823002 Cr-Commit-Position: refs/heads/master@{#467780} [modify] https://crrev.com/6bc101ebf27a7a56f28d5264aed265ec43a8db45/ui/android/java/src/org/chromium/ui/base/EventForwarder.java
,
Apr 27 2017
,
Apr 27 2017
Your change meets the bar and is auto-approved for M59. Please go ahead and merge the CL to branch 3071 manually. Please contact milestone owner if you have questions. Owners: amineer@(Android), cmasso@(iOS), gkihumba@(ChromeOS), Abdul Syed@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Apr 27 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1c0d3e95679659c1b01785b9fc666aa9a8de0431 commit 1c0d3e95679659c1b01785b9fc666aa9a8de0431 Author: Khushal <khushalsagar@google.com> Date: Thu Apr 27 22:40:22 2017 chrome/android: Consume down events for mouse drag gesture. Mouse drag gestures on android are delivered using a stream of ACTION_MOVE events. If the view does not consume the ACTION_DOWN event that starts the gesture, it will not receive the following move events. Consume this event in the EventForwarder to ensure the ContentView gets the complete gesture. BUG= 714845 Review-Url: https://codereview.chromium.org/2842823002 Cr-Commit-Position: refs/heads/master@{#467780} (cherry picked from commit 6bc101ebf27a7a56f28d5264aed265ec43a8db45) Review-Url: https://codereview.chromium.org/2851473006 . Cr-Commit-Position: refs/branch-heads/3071@{#276} Cr-Branched-From: a106f0abbf69dad349d4aaf4bcc4f5d376dd2377-refs/heads/master@{#464641} [modify] https://crrev.com/1c0d3e95679659c1b01785b9fc666aa9a8de0431/ui/android/java/src/org/chromium/ui/base/EventForwarder.java
,
Apr 27 2017
,
Apr 27 2017
so webview is still broken for unknown reason?
,
Apr 27 2017
No, this fixes Webview too. I wasn't testing for it correctly initially. :P
,
Apr 27 2017
cool, thanks
,
May 3 2017
verified on Chrome:59.0.3071.37 device:Nexus 6P/OPR1.170501.001.But when we click on any word the Contextual search is not working
,
May 3 2017
That isn't a regression. I tried on 58 and it doesn't work there either. Please file a feature request bug for it.
,
May 3 2017
Contextual search is not supposed to trigger on mouse click. It did in 57 and below as an unintended result of mapping mouse to touch.
,
May 3 2017
Re:#21 Okay. The contextual search is working with mouse click on Samsung devices. |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by aelias@chromium.org
, Apr 25 2017