You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
macOS: certain commands executed twice when focus is in webview #64724
When invoking a keybinding that also exists on the macOS native menu, while having focus inside a webview, the command is both triggered through the menu and our keybinding forwarder (here).
It looks like we could possibly use webContents.setIgnoreMenuShortcuts(true) to workaround this, but then any menu that is implemented with a :role will not work (e.g. cut, copy, paste).
Matt Bierner (@mjbvz) that was my previous solution but it lead to Daniel Imms (@Tyriar) bug that keybindings are not working on Windows. The problem is that the before-input-event does not carry all the keybinding information around that is needed for us to replicate the event on the main side.
Nevertheless, even before when I used before-input-event we were suffering from this bug.
Matt Bierner (@mjbvz) with your change, any command that is implemented with a :role does not work anymore inside the webview. For example, try to Cmd+C or undo/redo in an input field, it will not work because these commands only worked through the menu.
Activity
mjbvz commentedon Dec 19, 2018
I wonder if we can use the
before-input-eventhere to avoid having the listener in the webviewbpasero commentedon Dec 19, 2018
Matt Bierner (@mjbvz) that was my previous solution but it lead to Daniel Imms (@Tyriar) bug that keybindings are not working on Windows. The problem is that the before-input-event does not carry all the keybinding information around that is needed for us to replicate the event on the main side.
Nevertheless, even before when I used before-input-event we were suffering from this bug.
mjbvz commentedon Dec 19, 2018
SteVen Batten (@sbatten) Suggested that #64228 may also be of interest
bpasero commentedon Dec 20, 2018
Matt Bierner (@mjbvz) with your change, any command that is implemented with a
:roledoes not work anymore inside the webview. For example, try toCmd+Cor undo/redo in an input field, it will not work because these commands only worked through the menu.bpasero commentedon Dec 20, 2018
Actually since this issue is addressed, let's move that new issue to #65452