New issue
Advanced search Search tips

Issue 843675 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Omnibox Steady State Elisions: Unintuitive behavior for copying partial paths

Project Member Reported by tommycli@chromium.org, May 16 2018

Issue description

1. Turn on Steady State Elisions
2. Goto https://www.google.com/maps/place/Google/@33.9933834,-118.4803694,15z/data=!3m1!4b1

3. With Steady State Elisions, user sees: google.com/maps/place/Google/@33.9933834,-118.4803694,15z/data=!3m1!4b1

4. Imagine wants to copy paste a partial URL, and drag selects the first visible part: "google.com/maps"

5. After the drag select, the URL is unelided, and the selection looks like:

https://www.google.com/maps/@33.9933834,-118.4803694,15z/data=!3m1!4b1
            ^^^^^^^^^^^^^^^

That looks kind of unintuitive.

6. Worse, after the user copies that to the clipboard, what's in the clipboard is only "google.com/maps", which is hard to interpret as a URL, drops the https, and the www.

Here's something we could do to address this:

When the user selects the whole visible elided host (up to the very front), make sure the whole prefix is selected after unelision. The selection after unelision should look like:

https://www.google.com/maps/@33.9933834,-118.4803694,15z/data=!3m1!4b1
^^^^^^^^^^^^^^^^^^^^^^^^^^^

That would more closely match user intent.
 
Description: Show this description
I support that change, as it basically matches the logic for what we already do with copying stripped HTTP to the clipboard.
Great. To clarify, I think the correct change should only affects mouse drag-select.

Double-click and arrow keys should continue to work as they do today.

We will be able to verify that with our unit tests.
Sounds good to me, too.
Project Member

Comment 5 by bugdroid1@chromium.org, May 22 2018

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

commit 6e05e65805bc6f2c6f5707f68758ffaba16ab8af
Author: Tommy C. Li <tommycli@chromium.org>
Date: Tue May 22 17:05:38 2018

Omnibox UI Experiments: Steady State Elisions - Refine drag-select host

Currently, when the user selects a partial path from an elided URL, we
leave out the elided portion.

For instance, when the user drag selects:
google.com/maps
^^^^^^^^^^

After unelision, the selection becomes:
https://www.google.com/maps
            ^^^^^^^^^^

The user's intent here is to copy the whole first portion of the URL,
so dropping the scheme and subdomain here is undesirable.

This CL makes a guess when the user does a drag select on the whole
first portion of the elided URL that the user wishes to copy the
first portion of the unelided URL as well.

It only applies this logic when the selected text looks like a URL,
according to the OmniboxEditModel::IsPasteAndSearch logic, which we are
renaming to OmniboxEditModel::ClassifiesAsSearch.

TBR=ellyjones@chromium.org

Bug:  843675 ,  797354 
Change-Id: I0ca9aed0fd9886b0442eb5a1e880b13601d82101
Reviewed-on: https://chromium-review.googlesource.com/1068120
Commit-Queue: Tommy Li <tommycli@chromium.org>
Reviewed-by: Justin Donnelly <jdonnelly@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560663}
[modify] https://crrev.com/6e05e65805bc6f2c6f5707f68758ffaba16ab8af/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
[modify] https://crrev.com/6e05e65805bc6f2c6f5707f68758ffaba16ab8af/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
[modify] https://crrev.com/6e05e65805bc6f2c6f5707f68758ffaba16ab8af/chrome/browser/ui/views/omnibox/omnibox_view_views.h
[modify] https://crrev.com/6e05e65805bc6f2c6f5707f68758ffaba16ab8af/chrome/browser/ui/views/omnibox/omnibox_view_views_unittest.cc
[modify] https://crrev.com/6e05e65805bc6f2c6f5707f68758ffaba16ab8af/components/omnibox/browser/omnibox_edit_model.cc
[modify] https://crrev.com/6e05e65805bc6f2c6f5707f68758ffaba16ab8af/components/omnibox/browser/omnibox_edit_model.h

Components: UI>Browser>Omnibox
Status: Fixed (was: Assigned)

Sign in to add a comment