+1
Аяқталған

Double click to open new tab should focus the omnibox

dsl101 12 year бұрын updated by Joel Thornton 12 year бұрын 4

I like being able to double click in sidewise to open a new tab, but you can't start typing into the omnibox immediately as you can when opening a new tab via the Chrome UI - is this possible?

Answer

Answer
Аяқталған

This should be working as expected in today's new release (2012.11.23.0). Please let me know if it is not working 100% of the time for you now! :)

On my system, if you have it set to open the New Tab page when doing the double click, then the focus is set to the omnibox immediately after the New Tab page is opened. For the other options this doesn't happen on my machine.

Unfortunately Chrome doesn't provide any mechanism for extensions to focus the omnibox other than the aforementioned.

It seems a bit hit and miss - sometimes the focus is where I'd expect it to be, sometimes not (when the omnibox doesn't have focus, nothing else on the page does either). Haven't noticed a pattern yet. Will post back if I find anything...

It's not 100% repeatable, but about 98%+ - if I double-click on sidewise to open a new tab, the omnibox doesn't have focus (to be precise, I see the caret very briefly before it vanishes, leaving the focus who knows where). But if I immediately double-click again to open another new tab, focus is where it should be in the omnibox. I can keep opening new tabs like this, and everything is as it should be. It's only ever the first new tab which has the problem. Hope that helps!


Just to make things hard, every now and again (maybe 2% of the time?), the very first new tab does have the focus where it should be, but I haven't been able to work out what steps are needed to make that happen every time :(

I think I'll play around with adding a small delay after the double-click is received before creating the new tab, and/or focusing the window shortly before creating the new tab ... perhaps some combination of these will get it working properly all the time.

Answer
Аяқталған

This should be working as expected in today's new release (2012.11.23.0). Please let me know if it is not working 100% of the time for you now! :)