-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Dropdown Menu gets stuck on screen when window is not responding #16136
Comments
This is the repo to my project, and it happens when you press the copy button under the file dropdown. you will need to change the absolute file path though for the sqlite database in the AnimeContext file to the absolute path of the SQLiteTest.db file for it to not throw any errors in the current version of the project. |
@SirZeeno so, popup is kept on the screen while app is frozen, but properly hides when it unfrezes. I would strongly advise you to not block UI thread doing any long operations. Move these operations to separated threads or use async alternatives. |
well of course i know not to block the Main thread where the UI is being handled, but its the fact that it acts like its own window, and doent get affected by minimizing the main window that I feel like is a bug, or am I wrong here? |
@SirZeeno it is, in fact, its own window though. That's how popups work on many OS including Windows. Avalonia does hide them automatically, when window is not visible, but not when UI thread is frozen. You can switch to overlay popups by adding:
in your AppBuilder. This configuration will force all popups to be part of the same parent window, which also will limit their positioning by the boundaries of the parent. |
I wasn't aware of how they worked, I thought this was a bug of some kind. My bad and thanks for clearing this up for me. :) |
Describe the bug
when the window that the dropdown menu goes into a not responding state and the dropdown was active when that happened, then the dropdown menu stays open and even stays in the foreground of the screen even if you do to a different window on your screen (screenshot for reference)
To Reproduce
have a dropdown menu open, press a button in that dropdown menu that will execute some code that will run on the main thread and make the UI go unresponsive, and click to a different window.
Expected behavior
the dropdown should stay on the window it belongs to and it shouldn't stay in the foreground when the window it belongs to isn't in the foreground.
Avalonia version
11.0.11
OS
Windows
Additional context
This is happening in the debug version of my program, so I am unsure if the release version has that fixed.
The text was updated successfully, but these errors were encountered: