-
Notifications
You must be signed in to change notification settings - Fork 446
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
Multiple dialogs (AlertDialog) will create a ghost dialog #1670
Comments
I can confirm this, I see it a lot and had to do many work arounds to stop double clicks from opening two dialogs. My work around is to always call close_dialog before I call open dialog, sleep for 0.2 seconds and then open the new dialog. The delay sucks but seems to prevent this issue. |
I can also confirm that this annoying problem exists - faced it while working on Flet Studio app. It happens when quickly switching between alert dialogs or/and snack bars. Adding delay (to finish previous exit animation) between dialogs helps, but it's, of course, a hack. Will be working on fixing this bug. |
Sometimes the AlertDialog shows up as a long white column with a dark background. Not showing the intended content. I experienced this in adroid while running the app on Flet Studio. Am still stuck. |
I can confirm I am facing the same issue when switching between two alert dialogs. Adding a delay fixed it. Thank you! |
@donolsch could you provide a code to repro? |
* Dismiss drawers on page change * Fixed routing regression Fix flet-dev#2082 * ViewControl * Bottom sheet to use control state Fix flet-dev#2075 * AnimatedTransitionPage * Remove old animated pages * Flet version bumped to 0.12.1 * Added `BottomSheet. is_scroll_controlled` property Allows expanding bottom sheet on the entire screen. Close flet-dev#2087 * Fixed: close currently opened AlertDialog before opening a new one Fix flet-dev#1670 * Added `BottomSheet.maintain_bottom_view_insets_padding` property Close flet-dev#2010
Description
When open 1 dialog, close it and open another dialog, after closing the second dialog, a ghost dialog appeared.
Code example to reproduce the issue:
Describe the results you received:
The source was copied from https://flet.dev/docs/controls/alertdialog/, add one more dialog (dlg_msgbox)
start -> "Open modal dialog" -> "Yes" -> "Close"
After clicking "Close", a ghost dialog appeared.
Depending on the modal of last dialog, the screen will be frozen by the ghost dialog if the last dialog's modal=True.
Describe the results you expected:
Additional information you deem important (e.g. issue happens only occasionally):
If I add a sleep (between close dialog and open dialog), it may sometime fix it, but not 100%.
Flet version (
pip show flet
):In fact, older version (e.g. 0.7.4) also have this bug
flet==0.8.4
flet-core==0.8.4
flet-runtime==0.8.4
Operating system:
Windows 11 Pro
Python 3.11.4 (tags/v3.11.4:d2340ef, Jun 7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)] on win32
Additional environment details:
The text was updated successfully, but these errors were encountered: