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

Issue 698267 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Apr 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

⌘+C --> ⌘+N --> ⌘+V --> [Return] creates a new window with two tabs in it

Project Member Reported by ainslie@chromium.org, Mar 3 2017

Issue description

Chrome Version: 56.0.2924.87
OS Version: OS X 10.12.3

Using the keyboard shortcuts to 1. copy text, 2. make a new window, 3. paste the text, and 4. submit the search query sometimes creates a new window with two tabs in it instead of one. The focused tab is the first in position and the one in the background is the one with the SRP.

This seems to only happen if I do the final two steps quickly. If I wait with the new window open and the pasted text in the omnibox for a few seconds and then tap [return], I stay in the first tab. 

https://screenshot.googleplex.com/eT9abWQiFO8.png

 

Comment 1 by hwi@chromium.org, Mar 3 2017

Looks like the additional tab opens while still holding Cmd-key and + Enter key on the new window. 
Yes. Cmd-enter in the omnibox opens the link in a new tab. macOS doesn't require that you re-press the modifier for it to be active for subsequent keypresses (I think windows does).

Comment 3 Deleted

Comment 4 by hwi@chromium.org, Mar 3 2017

Clarification on c3(deleted)

On Win/CrOS/Linux:

Alt+Enter opens a new tab
Ctl+Enter doesn't open a new tab

Comment 5 by hwi@chromium.org, Mar 3 2017

And on Mac:

Both
Cmd+Return opens a new tab
Alt+Return opens a new tab

Should we keep both on Mac or keep only Alt+Enter for all platforms?
Safari's behavior:
cmd+return opens a new tab
opt+return downloads the html of the url

I say we keep the existing behavior on Mac.

Comment 7 by hwi@chromium.org, Mar 3 2017

Status: WontFix (was: Unconfirmed)
Changing this to wai/wontfix.
We can reopen if any modification to the shortcuts is necessary.
Ok. That sounds fine.  

As a general rule, accelerators should speed up tasks for experts without doing any harm for normal folks. In this case, the accelerator doesn't lead to data loss (that's good) but it does trigger when I don't want it to and that slows me down. 


To expand comment 2: on Windows, we intentionally detect and disable the case where you've held down the ctrl key between pasting and hitting enter, and disable ctrl-enter (in that case, "add www. and .com to pasted text").  We had too many user reports of exactly this sort of bug.  Since disabling there hasn't been a single report that ctrl-enter failed to work consistently.  I think whether the accelerator was released after a ctrl-v is a good signal, and I suggest Mac adopt this behavior.
Status: Untriaged (was: WontFix)
Neat - I didn't know we did that. 

Marking as untriaged in case someone from the Mac team could investigate that approach.  

Comment 11 by sdy@chromium.org, Apr 6 2017

I just noticed that I sometimes copy a URL from somewhere and then go to Chrome (if I'm not there already) and type ⌘L ⌘V ⌘⏎. (Go to the location bar, paste, open it in a new tab.) Does anyone else do something similar?

Comment 12 by sdy@chromium.org, Apr 6 2017

(…without letting go of the command key.)

Comment 13 by a...@chromium.org, Apr 7 2017

Re comment 9, that was implemented via control_key_state_ in OmniboxEditModel; we should try to do something similar.
Re: c#12, are you saying that you type ⌘⏎ intentionally?
[mac triage] So on Windows, Alt+Enter opens a URLs in a new tab: a different accelerator to what Paste uses.

On Mac they are the same: Paste and "Open URL in new/background tab" both use Cmd.

To fix this on Mac, we change the behaviour of "Open in new/background Tab". (On Windows, only the behavior of "append www.%.com to URL" was changed.)

In which case I think fixing this could lead to data loss. ⌘L ⌘V ⌘⏎ currently always opens a new tab. If we require ⌘ to be released between V and ⏎ then a user may unintentionally navigate their current page.

(So IMO this is WontFix).

Maybe we can detect "The current tab has only ever navigated to chrome://newtab" to enable a new codepath, but that seems fragile.
Status: WontFix (was: Untriaged)
I think I get it now. If we prevent users from accidentally triggering a new tab by filtering the "⌘" out of a ⌘⏎ that occurs after a ⌘V, we run the risk of an intentional ⌘⏎ user pasting over the omnibox's current URL. If that happens, the browser will navigate the current tab to a new location and potentially cause the user to lose data. So I think we need to leave things as they are.

Sign in to add a comment