New issue
Advanced search Search tips

Issue 918777 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Jan 17
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Feature



Sign in to add a comment

Ctrl+L should perhaps exit keyword search mode into regular Omnibox usage

Reported by doubleye...@gmail.com, Jan 3

Issue description

Chrome Version       : 71.0.3578.98
OS Version: 10.0
URLs (if applicable) :
Other browsers tested:
  Add OK or FAIL after other browsers where you have tested this issue:
     Safari:
    Firefox: OK (ish, different but predictable behavior)
    IE/Edge: OK

What steps will reproduce the problem?
1. Press 'search' hotkey (default ctrl+e)
2. Type in navbar (e.g. foo.com)
3. Press alt-d or ctrl+l (attempt to switch out of search context / back to normal nav)

What is the expected result?
Navbar switches away from search context and back to URL context

What happens instead of that?
A search occurs unless you:
- Perform the search and use the hotkeys
- Fully clear the navbar text and additionally press backspace again

Please provide any additional information below. Attach a screenshot if
possible.

Ideal behavior would be to treat alt+d / ctrl+l keys as a modal switch to move back to URL navigation and out of search.

UserAgentString: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36



 
Components: UI>Browser>Omnibox>AiS
Components: -UI>Browser>Omnibox>AiS UI>Browser>Omnibox
Labels: Needs-Triage-M71
Cc: vamshi.kommuri@chromium.org
Labels: -Pri-3 Triaged-ET Target-73 M-73 FoundIn-71 FoundIn-73 FoundIn-72 OS-Linux Pri-2
Status: Untriaged (was: Unconfirmed)
Thanks for filing the issue!

Able to reproduce the issue on reported chrome version 71.0.3578.98 and on the latest canary 73.0.3659.0 using Ubuntu 14.04 and Windows 10.
Note: Issue isn't applicable to Mac

As the issue is seen from M60(60.0.3112.0) considering it as Non-Regression and marking it as Untriaged.
Labels: -Type-Bug Type-Feature
Labels: -M-73 -Target-73 -FoundIn-71 -FoundIn-72 -FoundIn-73 -Needs-Triage-M71 OS-Chrome OS-Mac
Status: Available (was: Untriaged)
Summary: Ctrl+L should perhaps exit keyword search mode into regular Omnibox usage (was: Navbar hotkeys should allow switching from search to navigation context (and vice versa))
Seems like a pretty good feature request to me.
Labels: -Pri-2 Pri-3
Status: Started (was: Available)
What if the user wants to focus the omnibox but not leave keyword mode? 

Should ctrl+L / alt+D leave keyword mode 
(1) only when the omnibox is already focused or 
(2) regardless of omnibox focus? 

Option 2 has the minor user-inconvenience of having to know about and use the ctrl+e/k shortcuts.
For now, I'll work on making a CL for option 1.

Also worth considering, our help page [1] documents ctrl+L/alt+D as "Jump to the address bar", and does not imply leaving keyword mode. Perhaps, changing ctrl+e/k from "enter keyword mode" to "toggle keyword mode" would be a subtler solution for leaving keyword mode than changing ctrl+l/alt+d from "focus omnibox" to "focus omnibox and leave keyword mode".

[1] https://support.google.com/chrome/answer/157179?hl=en

Comment 10 by manukh@chromium.org, Jan 16 (6 days ago)

To add to my previous comment c#9,
option 1 has the downside of inconsistency between ctrl+e/k which always enter keyword mode and ctrl+l/alt+d which leaves keyword mode only when the omnibox is already focused.
Perhaps option 2 is the better solution for now since it's the simpler state model.

Comment 11 by k...@chromium.org, Jan 16 (6 days ago)

Drive by: If the user hasn't typed anything beyond just going into keyword mode, then unfocusing will already take it out of keyword mode.

If the user has typed something, and unfocused, then currently ^L will return it to that state. I don't know why we'd want to change that. I do this occasionally. Also, OP was clearly referring to (1) given steps 2 and 3.

The Omnibox has very good focus state handling. This shouldn't require any weird bolt-on logic.

I was going to suggest that ^K could toggle keyword mode, but instead, if I'm using a keyword e.g. wikipedia.org, ^K will switch it to Google. That was unexpected to me.

Project Member

Comment 12 by bugdroid1@chromium.org, Jan 17 (5 days ago)

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

commit 0ab6826e3dfab1f31213713a718b68e15b8ab9ea
Author: manuk <manukh@chromium.org>
Date: Thu Jan 17 17:42:49 2019

[omnibox] Leave keyword with <ctrl>+L or <alt>+D if omnibox is focused

Prior to this CL, <ctrl>+L or <alt>+D would focus the omnibox, but leave it in
keyword mode if it were in keyword mode. Moving the cursor to the front of the
text and pressing backspace was the only way to leave keyword mode while
preserving user inputted text.

With this CL, pressing <ctrl>+L or <alt>+D while the omnibox is not focused
will, as before, focus the omnibox, select its text, and leave keyword mode
unchanged. Pressing those shortcuts while the omnibox is already focused will
leave keyword mode and, as before, select the omnibox text.

Bug:  918777 
Change-Id: I0efc1060b40c46bd51048de521958172dad83e45
Reviewed-on: https://chromium-review.googlesource.com/c/1413013
Commit-Queue: manuk hovanesian <manukh@chromium.org>
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Reviewed-by: Tommy Li <tommycli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623742}
[modify] https://crrev.com/0ab6826e3dfab1f31213713a718b68e15b8ab9ea/chrome/browser/ui/views/location_bar/location_bar_view.cc
[modify] https://crrev.com/0ab6826e3dfab1f31213713a718b68e15b8ab9ea/chrome/browser/ui/views/toolbar/toolbar_view.cc
[modify] https://crrev.com/0ab6826e3dfab1f31213713a718b68e15b8ab9ea/components/omnibox/browser/omnibox_edit_model.cc

Comment 13 by manukh@chromium.org, Jan 17 (5 days ago)

Status: Fixed (was: Started)

Sign in to add a comment