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

Issue 615118 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Clicking URL while loading a URL prevents URL highlighting.

Project Member Reported by lgar...@chromium.org, May 26 2016

Issue description

Chrome 53.0.2748.0 
OSX 10.11.5

What steps will reproduce the problem?
(1) Paste "https://example.com/path" and press Enter.
(2) Before the page  finishes loading, click on the URL.
(3) Click on the page to defocus the omnibox.

What is the expected output?
The URL highlights "https" in green, and "://" and "/path" in gray.

What do you see instead?
The URL text stays black.


 

Comment 1 by shrike@chromium.org, May 26 2016

Labels: Needs-Feedback
Status: Unconfirmed (was: Assigned)
Please attach a screenshot (or better yet a movie).
no-url-highlight.mov
2.0 MB Download

Comment 3 by meh...@chromium.org, May 26 2016

Status: Untriaged (was: Unconfirmed)
I can reproduce it with latest Canary.

Comment 4 by shrike@chromium.org, May 26 2016

Cc: shrike@chromium.org
Labels: -Needs-Feedback M-53
Owner: spqc...@chromium.org
Seems like a race condition (the Omnibox eventually sends the styled URL but by then the textfield is editing).
Status: Assigned (was: Untriaged)
Quick question: Should the text be all black when it's selected?

Comment 7 by shrike@chromium.org, May 26 2016

I don't think so. If you go to https://www.google.com/, for example, and then select the text, the http portion will be green. That will change once you start editing it, and the Omnibox restyles it after each key press.

I'm not really sure how much of a bug this is. For example, if you

1. Go to https://www.google.com/ and let the page load
2. Select the Omnibox text
3. Type sdfsdfsdfsdfsf
4. Click in the page

the URL being displayed will not correspond to the page content being displayed, which is essentially the problem being reported. I also believe this is generic Omnibox behavior, not something peculiar that the Mac is doing.

Just looked over it. Here's the culprit: https://code.google.com/p/chromium/codesearch#chromium/src/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm&l=584

Should I just delete this then?

Comment 9 by shrike@chromium.org, May 27 2016

Thanks for figuring this out (and bummer about the typo in the comment).

If we remove this line we could run into trouble. For example, if the user clicks within the green http text and starts typing you could wind up with a bunch of green text that should not be green. But maybe the Omnibox takes care of the restyling on each key press. I suggest disabling this bit of code and see what happens.

If you disable it and the Omnibox doesn't restyle on key key press (so that you can wind up with colored text where it should not be), maybe get a Windows or Linux machine and see what the Windows version of Chrome does in this case.

I removed it and it now has the same behavior as Windows. From what I found, it restyles on every key presses. I'll go ahead and remove this
OK, very good!
Project Member

Comment 12 by bugdroid1@chromium.org, May 27 2016

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

commit c5b06f297e018d28ec498c8c18041e80fefccf2a
Author: spqchan <spqchan@chromium.org>
Date: Fri May 27 20:05:25 2016

[Material][Mac] Removed "single color while editing text" behavior

BUG= 615118 

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

[modify] https://crrev.com/c5b06f297e018d28ec498c8c18041e80fefccf2a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm

Status: Fixed (was: Assigned)

Comment 14 by sh...@chromium.org, May 27 2016

OSX Omnibox reformats everything on every change because the logic is too spread out across platform and non-platform code to track deltas reasonably.

Sign in to add a comment