-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[Mac-only] Remove "Start Dictation" and "Special characters" from window menu #2812
Comments
The "Edit" menu? These are OSX standard, removing dictation in particular would be an accessibility barrier - I'd be interested to know the reasoning? |
First thoose menu items are not necessarily in the Edit menu (the edit menu can be disabled with the hideEdit option). Secondly, unlike other native menus its are not translated in the local language. Thirdly, unlike other native menus, they are not changeable / overridable because they cannot be seen through nw api. So it is impossible to adapt the availability of the feature or the way it work depending on the context. Then, depending on the app it may be misleading for the user (Especially when there are no text inputs). It could also be an issue for code editors because dictation does not work well for code and it is not recommanded to use Apple special characters :-) |
Any update on this? I'm running into this issue over a year later... |
On Mac, the system will add several menu items to Edit menu, like `Emoji & Symbols` or `Start Dictation...`. These items are added after setting main menu. This patch will update menu items after setting main menu. Then developers can iterate items under edit menu and remove corresponding items. fixed nwjs#2812
@Montoya @felicienfrancois I made a PR #5132 which updates the menu items under For example, var menu = new nw.Menu({type:'menubar'});
menu.createMacBuiltin('myapp');
nw.Window.get().menu = menu;
// iterate the items under Edit
var editMenu = menu.items[1].submenu;
editMenu.items.forEach((item, i)=>{
// remove all native items
if (item.native) editMenu.remove(item);
}); If you want to keep just one, |
On Mac, the system will add several menu items to Edit menu, like `Emoji & Symbols` or `Start Dictation...`. These items are added after setting main menu. This patch will update menu items after setting main menu. Then developers can iterate items under edit menu and remove corresponding items. fixed nwjs#2812
On Mac, the system will add several menu items to Edit menu, like `Emoji & Symbols` or `Start Dictation...`. These items are added after setting main menu. This patch will update menu items after setting main menu. Then developers can iterate items under edit menu and remove corresponding items. fixed nwjs#2812
We should be able to remove thoose menu items.
Its seems to be added in all cases to the second window menu item, whatever its name.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: