Avalonia
Avalonia copied to clipboard
Opened dialog window allows to interact with context menu on parent window
Describe the bug Create a new project with main window with a button and some control with a context menu with a menu item. Add Click event to the button and to the menu item. In the Click method open a dialog window with ShowDialog method. Click on the Button to open a dialog - you can't call the context menu from the parent window. It's correct. Clink on the menu item on the context menu to open the same dialog window. Now you can interact with the context menu on the parent window and can open a second dialog window.
To Reproduce Build the project and start the code on Ubuntu Click right mouse button on pink area to open context menu Click Show Dialog item on the context menu to show dialog window. Don't close the dialog window and repeat steps 2 and 3. AvaloniaDialogTest.zip
Expected behavior It should be impossible to open context menu on parent window if dialog window opened.
Screenshots
Desktop (please complete the following information):
- OS:Ubuntu 20.04
- Version 0.10.11
Additional context Show Dialog button (not menu item) click calls the same code but context menu is not available in this case. This behavior is correct. The issue is not reproduced on Windows. Only on Linux platform.
This issue has been reported before, https://github.com/AvaloniaUI/Avalonia/issues/2958#issuecomment-788792024.
I personally don't use window dialogs anymore, instead, I created some kind of dialog host control in main shell and shows modal content or alerts inside it. Key bindings in main window will also be removed until the modal closes. It's a bit tricky, even Blender's file dialogs does not block main menu interactions on some Linux distributions.
What is the state on this issue, also is there a known workaround?
Any updates?
@Robotanchik no, no updates.
Duplicate of https://github.com/AvaloniaUI/Avalonia/issues/2958