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

Issue 768594 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
(OOO slow)
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug

Blocking:
issue 756241



Sign in to add a comment

Chrome Omnibox should not activate Smart Select

Project Member Reported by donnd@google.com, Sep 25 2017

Issue description

The Clank Omnibox should not activate Smart Select, even on Android O.

The Omnibox in Chrome is a TextView, so it will try to apply Smart Select by default.  We just need to setTextClassifier to the default NO_OP one:
https://developer.android.com/reference/android/view/textclassifier/TextClassifier.html#NO_OP
 

Comment 1 by donnd@google.com, Sep 25 2017

Owner: donnd@chromium.org
Status: Assigned (was: Available)

Comment 2 by donnd@google.com, Sep 26 2017

Cc: mariakho...@chromium.org
A long-press in the Omnibox currently does Smart Select (on O with a working ML model) and shows "BROWSER" as an option in the action bar, which doesn't seem helpful.  To disable this I'm thinking it would be best to disable at VerticallyFixedEditText so all similar small-edit-text fields don't try to be too smart.  Does that sound like the right code location?


What else is using VerticallyFixedEditText in clank?
I think it's fine for the find toolbar to also not receive smart selection events, but we may unwittingly extend VerticallyFixedEditText in the future for something where we actually do want smart select enabled (or at least don't have cause to disable).

It'd be great if we worked out a Chrome policy for whether our selectable text view's allow smart select by default or not. There are other edit text fields, e.g. in our autocomplete forms, that should probably be similarly be disabled, although the issue is not quite as acute as with the omnibox where we offer to open selected URLs in a browser. 
IMO, we should disable for Omnibox only and keep smart select for all other fields. Even if other fields may not give interesting data right now, it's possible there will be useful actions going forward since this is a pretty new feature. Seems like that would preserve consistency across platform. It does make sense to disable omnibox since we're being smart about omnibox interactions in Chrome.

Comment 7 by donnd@google.com, Oct 2 2017

Updated the design doc at go/cs-smartselect to reflect the plan to disable the Omnibox but allow other TextViews to show Smart Select. 
Project Member

Comment 8 by bugdroid1@chromium.org, Oct 2 2017

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

commit 1925ab6f4d06fe54b4659ab84944888af22d387c
Author: Donn Denman <donnd@google.com>
Date: Mon Oct 02 20:57:33 2017

Disable Smart Select for the Omnibox.

Disables the Smart Select Text Classifier for the Omnibox.
This prevents a longpress gesture in the Omnibox on Android from
suggesting "BROWSER" as an action in the Action Bar.

BUG= 768594 

Change-Id: I2dccb6b7443d9891e4243d7288fd65beb9a9da0f
Reviewed-on: https://chromium-review.googlesource.com/686060
Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
Reviewed-by: Theresa <twellington@chromium.org>
Commit-Queue: Donn Denman <donnd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505779}
[modify] https://crrev.com/1925ab6f4d06fe54b4659ab84944888af22d387c/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
[modify] https://crrev.com/1925ab6f4d06fe54b4659ab84944888af22d387c/chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java

Comment 9 by donnd@google.com, Oct 2 2017

Status: Fixed (was: Assigned)

Sign in to add a comment