New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 666060 link

Starred by 6 users

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug

Blocking:
issue 675339



Sign in to add a comment

Android text selection with mouse

Project Member Reported by mustaq@chromium.org, Nov 16 2016

Issue description

Android 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.

 
I was not able to move the touch selection handles using the mouse. I was using a Nexus 6P, Android M, 56.0.2920.0.
Labels: -Pri-3 Hotlist-Input-Dev Pri-2
Owner: mustaq@chromium.org
Status: Assigned (was: Available)
Blocking: 675339

Comment 4 by mustaq@chromium.org, 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.

Comment 5 by mustaq@chromium.org, Jan 16 2017

Correction: I meant ACTION_BUTTON_PRESS instead of ACTION_POINTER_DOWN in #c4.

Comment 6 by aelias@chromium.org, 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.
Project Member

Comment 7 by bugdroid1@chromium.org, 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

Comment 8 by mustaq@chromium.org, Feb 22 2017

Status: Fixed (was: Assigned)

Sign in to add a comment