Skip to content
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

Popup Is Stuck Open #230

Open
GoodFolkDigital opened this issue Feb 10, 2025 · 1 comment
Open

Popup Is Stuck Open #230

GoodFolkDigital opened this issue Feb 10, 2025 · 1 comment

Comments

@GoodFolkDigital
Copy link

GoodFolkDigital commented Feb 10, 2025

I've updated from 2.0.0 to 4.0.0 and finding that my popups are getting stuck on screen and not auto dismissing.

If I am in View A, and launch View B in a .sheet for example, if I close View B the toast is stuck on screen and not dismissing itself even after the allotted autohide time.

      .popup(isPresented: $showToast) {
            ToasterView(title: $toastTitle, message: $toastMessage)
        } customize: {
            $0
                .type(.floater())
                .animation(.easeIn)
                .autohideIn(5)
                .closeOnTapOutside(true)
        }

Even upon closing the app and reopening i am seeing this toast sitting on the screen. In the videos below you'll see me slide it down lower when trying to dismiss it

https://streamable.com/5x71uu?src=player-page-share

https://streamable.com/x6yu1e?src=player-page-share

@f3dm76
Copy link
Collaborator

f3dm76 commented Feb 11, 2025

Hey @GoodFolkDigital, couldn't reproduce, please attach a minimal compilable example and make sure the issue reproduces on this minimal example. Have a nice day

https://github.com/user-attachments/assets/cf5299f6-bfd0-4f81-be16-c9038fb1dc09
https://github.com/user-attachments/assets/0fa0ef06-a140-4ed3-aae4-12c33b512db2

here is my code:

struct SomeView: View {
    @State var a = false
    @State var b = false

    var body: some View {
        ZStack {
            Color.blue.opacity(0.2)
            VStack {
                Button("a") { a.toggle() }
                Button("b") { b.toggle() }
            }
        }
        .sheet(isPresented: $a) {
            Color.red.opacity(0.2)
        }
        .popup(isPresented: $b) {
            Color.yellow.opacity(0.2).frame(width: 100, height: 100)
        } customize: {
            $0.type(.floater())
                .animation(.easeIn)
                .autohideIn(3)
                .closeOnTapOutside(true)
                .displayMode(.window)
        }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants