You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
This issue only relates to a single bug. I will open new issues for any other problems.
Describe the bug
Hi!,
I don't know if this is a feature or bug.
Is it correct that calling popUp.Hide() closes all overlays that occur after popUp.Show()?
In my actual use case, in a function on entry I do a popUp.Show() and then do a "defer popUp.Hide()" so that it is executed at the end of the function.
The problem is that any dialog that I show during the execution of the function, does not end up showing because defer popUp.Hide() hides all the dialogs.
How to reproduce
Run the example code.
Click the "Show PopUp" button
Notice that only the first dialog box before popUp.Show() is displayed.
Screenshots
No response
Example code
package main
import (
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/dialog"
"fyne.io/fyne/v2/widget"
)
func main() {
a := app.New()
w := a.NewWindow("Bug example")
popToShow := widget.NewPopUp(widget.NewLabel("PopUp Label"), w.Canvas())
prePopUpDialogToShow := dialog.NewCustom("Pre popUp Custom Dialog", "Dismiss", widget.NewLabel("Test Content"), w)
postPopUpDialogToShow := dialog.NewCustom("Post popUp Custom Dialog", "Dismiss", widget.NewLabel("Test Content"), w)
postPopUpDialogToShow2 := dialog.NewCustom("Post popUp Custom Dialog 2", "Dismiss", widget.NewLabel("Test Content"), w)
w.Resize(fyne.NewSize(300, 300))
w.SetContent(
widget.NewButton(
"Show PopUp",
func() {
prePopUpDialogToShow.Show()
popToShow.ShowAtRelativePosition(fyne.NewPos(0, 0), w.Content())
postPopUpDialogToShow.Show()
postPopUpDialogToShow2.Show()
popToShow.Hide() // <- This not only hides the popup, but also hides all overlays after the popup is shown.
},
),
)
w.ShowAndRun()
}
Fyne version
2.4.3
Go compiler version
1.22.2
Operating system and version
Linux Mint 21.2
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Checklist
Describe the bug
Hi!,
I don't know if this is a feature or bug.
Is it correct that calling popUp.Hide() closes all overlays that occur after popUp.Show()?
In my actual use case, in a function on entry I do a popUp.Show() and then do a "defer popUp.Hide()" so that it is executed at the end of the function.
The problem is that any dialog that I show during the execution of the function, does not end up showing because defer popUp.Hide() hides all the dialogs.
How to reproduce
Screenshots
No response
Example code
Fyne version
2.4.3
Go compiler version
1.22.2
Operating system and version
Linux Mint 21.2
Additional Information
No response
The text was updated successfully, but these errors were encountered: