Avalonia icon indicating copy to clipboard operation
Avalonia copied to clipboard

Opened dialog window allows to interact with context menu on parent window

Open alexeybut opened this issue 3 years ago • 2 comments

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 dialog issue

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.

alexeybut avatar Dec 30 '21 21:12 alexeybut

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.

luthfiampas avatar Dec 31 '21 11:12 luthfiampas

What is the state on this issue, also is there a known workaround?

AMohamedFawzy avatar Sep 08 '22 21:09 AMohamedFawzy

Any updates?

Robotanchik avatar Jan 26 '23 06:01 Robotanchik

@Robotanchik no, no updates.

Duplicate of https://github.com/AvaloniaUI/Avalonia/issues/2958

maxkatz6 avatar Jan 26 '23 07:01 maxkatz6