Android text selection with mouse |
||||
Issue descriptionAndroid text selection is currently triggered through touch interactions only. Until M55, Blink "saw" mouse events as touch events, so it was not an issue. From M56, mouse events reach Blink as mouse events through a separate path ( Issue 468806 ) which can't trigger text selection now. Note that once text selection handles appear through touch, they can be moved using mouse. The problem seems to be in triggering only.
,
Jan 5 2017
,
Jan 5 2017
,
Jan 16 2017
In my initial patch for Issue 468806 , I was able to drag touch text selection handles using mouse. Pedro is right in #c1: this no longer works. May be switching over to ACTION_POINTER_DOWN caused it? Update: as of today, I am able to make text selection highlight appear through mouse, but the selection handles don't show up.
,
Jan 16 2017
Correction: I meant ACTION_BUTTON_PRESS instead of ACTION_POINTER_DOWN in #c4.
,
Jan 17 2017
Selection handles are for adjusting selections with touch and I think we shouldn't show them when the user is interacting with mouse. We can go ahead and hide them if already present when the mouse cursor moves. I understand this is already the behavior on ChromeOS so we would just need to hook up/duplicate the same code.
,
Feb 22 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/58aea4974d2230c5900f79d9d6344747033a6500 commit 58aea4974d2230c5900f79d9d6344747033a6500 Author: mustaq <mustaq@chromium.org> Date: Wed Feb 22 18:55:59 2017 Fixed Android text selection by redefining |button| value. The |button| field in WebPointerProperties (used in WebMouseEvent and WebTouchPoint) follows the dom UI Events spec which is well-defined for mousedown/up events and for single-button-presses in other events. For Android WebMouseEvents (enabled recently), we initially set this value following the PointerEvent spec (which covers the multi-button-press case perfectly) then discovered that text selection is not working. We also discovered a bunch of other functionalities that depend on UI Events like assumptions. This CL refines Android |button| field to match other platforms, thus fixes text selection. BUG= 666060 Review-Url: https://codereview.chromium.org/2639623002 Cr-Commit-Position: refs/heads/master@{#452150} [modify] https://crrev.com/58aea4974d2230c5900f79d9d6344747033a6500/content/browser/android/content_view_core_impl.cc [modify] https://crrev.com/58aea4974d2230c5900f79d9d6344747033a6500/content/browser/android/content_view_core_impl.h [modify] https://crrev.com/58aea4974d2230c5900f79d9d6344747033a6500/content/browser/renderer_host/input/web_input_event_builders_android.cc [modify] https://crrev.com/58aea4974d2230c5900f79d9d6344747033a6500/content/browser/renderer_host/input/web_input_event_builders_android.h [modify] https://crrev.com/58aea4974d2230c5900f79d9d6344747033a6500/content/browser/renderer_host/render_widget_host_view_android.cc [modify] https://crrev.com/58aea4974d2230c5900f79d9d6344747033a6500/content/browser/renderer_host/render_widget_host_view_android.h [modify] https://crrev.com/58aea4974d2230c5900f79d9d6344747033a6500/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java [modify] https://crrev.com/58aea4974d2230c5900f79d9d6344747033a6500/third_party/WebKit/public/platform/WebPointerProperties.h
,
Feb 22 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by amaralp@chromium.org
, Nov 16 2016