-
Notifications
You must be signed in to change notification settings - Fork 26
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
[bug] After context menus are opened, menu events are no longer received for other menus. #162
Comments
Here's a brief recording of the bug in action. After menu2 is activated, menu1 no longer functions. repro-tauri-contextmenus_RgX9HE2SAV.mp4 |
I debugged this a bit and found that muda's |
Here's a PR with a hack that seems to work around the issue. Not the right way to fix it long-term, but hopefully having a demo helps. |
Unfortunately, the fix didn't work. I've updated the original repro (same link) to use tauri beta 12 and muda 0.12.1; the problem still occurs. I believe this is because, while muda now uses a separate subclass for the context window's event handler, it still shares that subclass between all context menus. So only the last-opened context menu can ever receive events. |
Overriding the subclass using the same ID and function pointer, results in only updating the reference data https://learn.microsoft.com/en-us/windows/win32/api/commctrl/nf-commctrl-setwindowsubclass#remarks closes #162
Thanks for the fix, I'll try the new version soon! |
Describe the bug
My application has multiple context menus. Once I've popped them each up a couple of times, the handler I've set with
on_menu_event()
only receives events for the most recent kind of context menu - not others, and not the main menubar.Reproduction
https://github.com/gulbanana/repro-tauri-contextmenus
To demonstrate the problem:
npm install
npm run tauri dev
Expected behavior
I expect that menu events for existing menus continue to be delivered after using a context menu.
Full
tauri info
outputStack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: