Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Inconsistent Keyboard Shortcuts #1297

Closed
evan-evone opened this issue Dec 30, 2018 · 4 comments
Closed

Inconsistent Keyboard Shortcuts #1297

evan-evone opened this issue Dec 30, 2018 · 4 comments
Labels

Comments

@evan-evone
Copy link

Operation System: macOS 10.13.6
Beaker version: v0.8.2

At times, keyboard shortcuts (such as cmd-shift-{/} to switch tabs and cmd-F to find) will work exactly as expected. However, at other times, they won't work at all, and I need to go to the toolbar to carry out the functions. These are the keyboard shortcuts given in the help menu, so it is weird that they will only work some of the time.

I don't know if there's something I'm missing, or if there's an actual bug that needs to be fixed, but any help would be appreciated!

@evan-evone
Copy link
Author

For what it's worth, ctrl-tab and ctrl-shift-tab always work for switching tabs, but they are not the same shortcuts as are given in the toolbar.

@evan-evone
Copy link
Author

Checking the open application was a good thought, but I just tried it and saw the same results, so... no luck.

Additionally, this same keyboard shortcut always works in Google Chrome, regardless of what I have open, so I doubt it's a shortcut conflict.


For Clarity: When I say the keyboard shortcuts are "sporadic," I don't just mean that the shortcuts only work sometimes. I mean that they'll work two or three times in a row, then suddenly stop working - I won't have left beaker or anything like that, they just stop, and then start again.

  • E.G. if I have 5 tabs open, and I'm on tab 1 and want to get to tab 5, I would normally do cmd-shift-} 4 times, but in beaker, it might let me advance one tab and then refuse to let me advance further.

I did some searching before I opened this issue, but found nothing directly related to my problem. I didn't, see, however, #1219, which is focused mostly on cmd-f (ctrl-f, in that case), but also seemed to indicate that other shortcuts were in error as well. No solution was found, but @pfrazee brought up the localshortcut module, and electron/electron#15094.

For Reference: From the link in the previous comment, here are the issues I think could be related to this one:

@beakerbrowser beakerbrowser deleted a comment from Butterfly Jan 11, 2019
@pfrazee pfrazee added the bug label Jan 11, 2019
@jbaicoianu
Copy link

I see the same behavior in Windows as well, it seems like a problem with how Beaker is handling keyboard focus - as if the event handlers are attached to some element, but that element loses focus when a tab is selected using this shortcut. I can click anywhere within the app or within the tab's contents to refocus, and then the keyboard shortcut starts working again.

Interestingly, and perhaps a clue - if I have the URL bar focused, I get two presses out of this keyboard combination rather than just one before it stops working. I wonder if there's an event handler in the URL bar's blur event which focuses the correct element?

@lvivier
Copy link
Contributor

lvivier commented Feb 2, 2019

I believe this is due to a change in Electron in v3, the introduction of OOPIF in Chromium. The relevant WebView documentation is here.

Electron issues:

I built master with electron@3.0.0-beta.5 and I can confirm this bug doesn't manifest in that version.

One solution might be to forward keydown events from the webviews up to the BrowserWindow. @pfrazee can you give me a pointer about where to start playing with webview ipc? Would this belong in beaker/core (looking at app/webview-preload.js)?

@pfrazee pfrazee closed this as completed May 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants