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
My app has a main window and a sub window that can be launched from the main window. In the main window I’ve created a menu and call menu.setAsAppMenu() to activate it. One of the menu items is a custom MenuItem to launch the sub window.
When I launch the sub window I want a different app menu. So I create a completely different menu and listen for tauri://window-created to activate it. I listen for ‘tauri://destroyed' on the sub window to reset the menu back to the original menu.
When I open the sub window the new menu is updated correctly. When I close the sub window the original menu is also updated correctly. Except none of the custom MenuItem’s in the original menu work anymore. They still show up and look clickable but nothing happens when they are clicked. PredefinedMenuItem’s work fine.
Describe the bug
My app has a main window and a sub window that can be launched from the main window. In the main window I’ve created a menu and call
menu.setAsAppMenu()
to activate it. One of the menu items is a custom MenuItem to launch the sub window.When I launch the sub window I want a different app menu. So I create a completely different menu and listen for
tauri://window-created
to activate it. I listen for ‘tauri://destroyed' on the sub window to reset the menu back to the original menu.When I open the sub window the new menu is updated correctly. When I close the sub window the original menu is also updated correctly. Except none of the custom MenuItem’s in the original menu work anymore. They still show up and look clickable but nothing happens when they are clicked. PredefinedMenuItem’s work fine.
Reproduction
Reproduction: https://github.com/BjornDCode/tauri-app-menu-bug
npm run tauri dev
Expected behavior
I would expect custom menu items to work after the menu is updated
Full
tauri info
outputStack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: