Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

return focus to page after text input and UI interaction #226

Closed
chairmank opened this issue Oct 8, 2010 · 18 comments
Closed

return focus to page after text input and UI interaction #226

chairmank opened this issue Oct 8, 2010 · 18 comments

Comments

@chairmank
Copy link

Text input boxes within web pages and the address input box of the browser GUI (Ctrl-L) steal focus and there is no way to return to "command-mode" scrolling, etc. It would be nice to be able to use Ctrl-C or Esc to escape from "insert mode".

To reproduce:

  1. Go to http://www.google.com, tab to the search query input box, start typing a query. No way to escape the query input box to scroll through the search results.
  2. Type Ctrl-L to enter a URL (is there any other vim-like way to do this?). No way to navigate the loaded page with keys.

I am using chromium-browser 6.0.472.62 (59676) Ubuntu 10.04

@jb55
Copy link
Contributor

jb55 commented Oct 8, 2010

I usually just end up pressing tab to get around this

@philc
Copy link
Owner

philc commented Oct 9, 2010

Guys, the intended design is to hit "esc" while in insert mode (this includes when you're focused on a textbox) and you will enter command mode. This works for me everywhere including on google.com.

The browser's address bar is a different matter, since it's not inside the webpage. Chrome does not give us access to keystrokes while you're typing in the address bar, so for now, there is no way for us to put you in command mode. Hitting tab as jb55 mentioned is a workaround.

@chairmank
Copy link
Author

I think that it's more subtle than I first reported. Sorry for not giving more pointers on reproducibility. Enter search query on google (Insert mode turns on), press escape (Insert mode disappears), press escape again (Insert mode reappears), and now further presses of escape key do not return to command mode.

@philc
Copy link
Owner

philc commented Oct 9, 2010

Ah, ok; I'll reopen this bug for further investigation.

@reynir
Copy link

reynir commented Aug 19, 2011

This is a bug in chromium on linux. On Windows (and mac I think) you can press F6 to escape the omnibar, but that's not the case on linux. I have filed a bug report so if this bothers you please tell them there :-)

@int3
Copy link
Collaborator

int3 commented Jan 18, 2012

Both (1) and (2) seem to work for me now. Please reopen if there is still a problem. Thanks!

@int3 int3 closed this as completed Jan 18, 2012
@reynir
Copy link

reynir commented Jan 18, 2012

A correction: (2) is the bug only occuring on linux. You can look at the bug report above for more information. My computer broke a week ago so I am not able to test it.

@int3 int3 reopened this Jan 18, 2012
@philc
Copy link
Owner

philc commented Feb 13, 2012

#2 is not a bug we can fix, unfortunately. It's outside of the extension's control. We're implementing our own URL bar in in #459 which will mitigate this to some extent.

@xavierchow
Copy link

Though we all understand it's out of vimium's scope, another nice hack is here: http://superuser.com/questions/324266/google-chrome-mac-set-keyboard-focus-from-address-bar-back-to-page/324267#324267, it needs less key strokes and doesn't change the position of page(html).

@jkryanchou
Copy link

And now my solution is to ctrl+f to search page return to the page content.

@GoTop
Copy link

GoTop commented Jul 3, 2019

I found using @jb55's method, press "Tab" key is the best.

@nivv
Copy link

nivv commented Jan 16, 2020

I found using @jb55's method, press "Tab" key is the best.

This doesn't work for me, pressing tab focuses the next extension:

image

Or in this case, the favourite star thing

@alon-to
Copy link

alon-to commented Feb 14, 2020

I'm asking for the same feature in the wonderful Shortkeys extension (complements Vimium wonderfully).

Here's my (annoying, slow, but consistent) workaround to get focus from URL bar back to the page as I also describe here:

For the last several years I've been using the solution in this thread: I created a Chrome custom search engine that points to the Query URL javascript: and mapped it to the letter 'u'. When I'm in the address bar and want to exit I remove anything in the URL bar, and hit u + enter.

If Shortkeys can run javascript via a shortcut while the cursor is in the URL bar then perhaps this is an answer?

image

@minhlong
Copy link

minhlong commented May 4, 2021

I found using @jb55's method, press "Tab" key is the best.

it works with me, just press 'esc' and 'tab' key.

Thanks,

@mcp292
Copy link

mcp292 commented May 25, 2021

As mentioned by philc this is a browser issue since Vimium cannot access strokes out of the page focus.

For anyone who came here from firefox the browser key to return focus to page is F6. Now to figure out how to bind this.

@alanhg
Copy link

alanhg commented Nov 3, 2021

tell application "Google Chrome" to set URL of active tab of window 1 to "javascript:"

@aalvarado
Copy link

ctrl+F works for me after making a tab a window with W

@bek9
Copy link

bek9 commented Aug 10, 2022

I recommend Command + Option + Up Arrow. It's only a key combo, no incidental works and no additional settings. It works fine on macOS but I haven't checked if it works on Windows yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests