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
Output of node_modules/.bin/electron --version: v4.0.1
Operating System (Platform and Version): Ubuntu 18.04
Expected Behavior
The default keyboard shortcuts for menu item roles should be registered (except in special cases where they're handled elsewhere - cut/copy/etc).
Actual behavior
As of v4, the keyboard shortcuts for any menu item with a role are not registered by default.
To Reproduce
In a v4 electron app, adding the below menu item will show a Ctrl/Cmd+R accelerator in the menu, but won't actually register it, so it won't work:
I.e. registerAccelerator defaults to true only if there's no role for the menu item. If there is a role set, it instead uses the registerAccelerator setting for that role, but for almost all roles this is undefined.
The text was updated successfully, but these errors were encountered:
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
node_modules/.bin/electron --version
: v4.0.1Expected Behavior
The default keyboard shortcuts for menu item roles should be registered (except in special cases where they're handled elsewhere - cut/copy/etc).
Actual behavior
As of v4, the keyboard shortcuts for any menu item with a role are not registered by default.
To Reproduce
In a v4 electron app, adding the below menu item will show a Ctrl/Cmd+R accelerator in the menu, but won't actually register it, so it won't work:
this menu item does work:
I think this is caused by #15723, specifically
electron/lib/browser/api/menu-item-roles.js
Lines 256 to 258 in a1a431e
I.e.
registerAccelerator
defaults totrue
only if there's no role for the menu item. If there is a role set, it instead uses theregisterAccelerator
setting for that role, but for almost all roles this isundefined
.The text was updated successfully, but these errors were encountered: