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

[Chrome bug on macOS] QuicKey instantly returns to last tab, if Find dialog is open and unfocused #56

Open
garyking opened this issue Mar 16, 2021 · 4 comments

Comments

@garyking
Copy link

  1. Open two tabs.
  2. On the first tab, open the Find dialog (cmd-F).
  3. Remove focus from the Find dialog, by clicking anywhere on the webpage.
  4. Move to the second tab.
  5. Activate QuicKey, and jump to the first tab.
  6. Active QuicKey again. At this point, QuicKey will not appear, and instead, Chrome focuses onto the second tab, instantly.
@fwextensions
Copy link
Owner

Thanks for the bug report. Which version of Chrome and OS are you on? I assume macOS, as I can't reproduce it on Windows. I was able to repro it on Chrome 85 on Mac, though.

This seems to be a bug with Chrome, where the open find dialog is causing the focus to act weirdly. For instance, if you focus a text area on a page, and then press ctrl-tab to switch to the next tab, and then press ctrl-shift-tab to switch back, the focus is still in the text area on the first tab. But if you open the find dialog on the first page, then click in a text area to focus it, and then ctrl-tab away and back, the focus is no longer in the text area. Something about the find dialog being open causes the focus to misbehave.

I'm able to reproduce this with other extensions that have a toolbar drop-down activated with a keyboard shortcut. The first time you press the shortcut on a page with the unfocused find dialog, you'll see the extension's icon highlight briefly, but the drop-down doesn't open. (Well, it does, but it's closed too quickly to see it open.)

The reason QuicKey triggers a navigation in this case is that it'll switch to the previous tab when you quickly double-press its activation shortcut (ctrl-Q by default). Normally, this causes the menu to open on the first press, and then immediately close on the second press. QuicKey detects this quick open-close and uses it to trigger a switch to the previous tab, which lets you use a double-press of the main keyboard shortcut to toggle between tabs.

With the Mac bug, the first press causes the menu to open, but because the find dialog is also open, the menu is immediately closed, triggering the navigation without a second shortcut press. When using other extensions, the first shortcut press appears to do nothing, but it does change the focus state in some way, as you can press the shortcut again to open the extension normally.

I'm not sure there's any way to work around this bug other than disabling the double-press navigation on macOS.

@fwextensions fwextensions changed the title QuicKey instantly returns to last tab, if Find dialog is open and unfocused [Chrome bug on macOS] QuicKey instantly returns to last tab, if Find dialog is open and unfocused Mar 18, 2021
@garyking
Copy link
Author

Okay thanks, at least now we know what the problem is.

I'm on Chrome 89 and MacOS 10.14.

I've had this problem for a while now, maybe a year, but was never able to pinpoint the repro steps until now.

@fwextensions
Copy link
Owner

Thanks for detailing the steps. How often do you run into this bug? Wonder if it's worth adding an option to disable the double-press behavior, or just disabling it for all Mac users.

@garyking
Copy link
Author

I run into this bug maybe once a week. Not too frequently. But it's annoying when it happens.

I don't use the double-press behavior, so it wouldn't bother me if that was disabled.

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

2 participants