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

Issue 606175 link

Starred by 2 users

Issue metadata

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



Sign in to add a comment

Text selected with double-tap should not cause vibration

Project Member Reported by moh...@chromium.org, Apr 24 2016

Issue description

Steps to reproduce:
(1) Go to a page with and editable textfield (e.g. www.google.com);
(2) Type some text in the textfield;
(3) Double-tap on a text in textfield to select some text.

Expected result:
A word should be selected, but no vibration should happen. Vibration is for long-press text selection only. That's the standard behavior on Android platform.

Actual result:
A word is selected and the device vibrates.

Some context:
The vibration happens in ContentViewCore.java whenever selection handles are shown [1] as there is no way to distinguish between selections from long-press and double-tap. TouchSelectionController (almost) knows the cause of selection (|response_pending_input_event_|) and we probably can propagate this data to ContentViewCore.java.

[1] https://code.google.com/p/chromium/codesearch#chromium/src/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java&l=2289
 
Cc: aelias@chromium.org
Also tracked in buganizer: https://buganizer.corp.google.com/u/0/issues/27198346
Friendly ping on this?  This is a big inconsistency between Chrome/WebView and TextView.

Comment 4 by aelias@chromium.org, May 10 2016

Owner: amaralp@chromium.org
Status: Assigned (was: Available)
Project Member

Comment 5 by bugdroid1@chromium.org, May 24 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6de57089abaea05decce400f1bae7889b34e839b

commit 6de57089abaea05decce400f1bae7889b34e839b
Author: amaralp <amaralp@chromium.org>
Date: Tue May 24 00:45:41 2016

Text selected with double-tap should not cause vibration

Previously a haptic feedback (vibration) was performed whenever selection handles
were shown. This was problematic since double tapping on text would also cause the
selection handles to be shown. Now haptic feedback only occurs when a long press
gesture is handled. This required changing some context menu logic to return whether
or not a context menu was actually shown.

BUG= 606175 

Review-Url: https://codereview.chromium.org/1986783002
Cr-Commit-Position: refs/heads/master@{#395490}

[modify] https://crrev.com/6de57089abaea05decce400f1bae7889b34e839b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java
[modify] https://crrev.com/6de57089abaea05decce400f1bae7889b34e839b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuHelper.java
[modify] https://crrev.com/6de57089abaea05decce400f1bae7889b34e839b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuPopulator.java
[modify] https://crrev.com/6de57089abaea05decce400f1bae7889b34e839b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuPopulator.java
[modify] https://crrev.com/6de57089abaea05decce400f1bae7889b34e839b/content/browser/android/content_view_core_impl.cc
[modify] https://crrev.com/6de57089abaea05decce400f1bae7889b34e839b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
[modify] https://crrev.com/6de57089abaea05decce400f1bae7889b34e839b/third_party/WebKit/Source/core/loader/EmptyClients.h
[modify] https://crrev.com/6de57089abaea05decce400f1bae7889b34e839b/third_party/WebKit/Source/core/page/ContextMenuClient.h
[modify] https://crrev.com/6de57089abaea05decce400f1bae7889b34e839b/third_party/WebKit/Source/core/page/ContextMenuController.cpp
[modify] https://crrev.com/6de57089abaea05decce400f1bae7889b34e839b/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp
[modify] https://crrev.com/6de57089abaea05decce400f1bae7889b34e839b/third_party/WebKit/Source/web/ContextMenuClientImpl.h
[modify] https://crrev.com/6de57089abaea05decce400f1bae7889b34e839b/third_party/WebKit/Source/web/tests/WebViewTest.cpp
[add] https://crrev.com/6de57089abaea05decce400f1bae7889b34e839b/third_party/WebKit/Source/web/tests/data/long_press_empty_div.html
[add] https://crrev.com/6de57089abaea05decce400f1bae7889b34e839b/third_party/WebKit/Source/web/tests/data/long_press_image.html
[add] https://crrev.com/6de57089abaea05decce400f1bae7889b34e839b/third_party/WebKit/Source/web/tests/data/long_press_link.html
[add] https://crrev.com/6de57089abaea05decce400f1bae7889b34e839b/third_party/WebKit/Source/web/tests/data/long_press_video.html

Comment 6 by aelias@chromium.org, May 24 2016

Status: Fixed (was: Assigned)
The fix will be part of M53.

Sign in to add a comment