joogps / SlideOverCard

A SwiftUI card view, made great for setup interactions.
MIT License
1.1k stars 43 forks source link

Sheet with .slideOverCard(item...) modifier can't be opened the second time #30

Open chichkanov opened 7 months ago

chichkanov commented 7 months ago

Steps to repro

  1. Open the sheet
  2. Close it
  3. Try to open again -> the UI is not clickable. Seems like the Window is not dismissed properly

Env Simulator iPhone 15 pro max, iOS 17.4

When I use .slideOverCard(isPresented...) modifier everything works fine

Code sample

struct Sheet3: Identifiable {
    var id: String { title }
    let title: String
}

struct ContentView: View {

    @State private var showSheet3: Sheet3? = nil

    var body: some View {
        VStack {
            // Can't click again once dismissed
            Button("Show sheet #3") { showSheet3 = .init(title: "Sheet #3")  }
        }
        .slideOverCard(item: $showSheet3, onDismiss: { print("Sheet #3 dismiss") }) { sheet3 in
            Text(sheet3.title)
        }
    }
}

Video

When I dismissed the sheet I was trying to click on a Button again.

https://github.com/joogps/SlideOverCard/assets/22872688/330bed9a-f067-4d5e-b58e-8a1018f36b68

TomKowalczuk commented 6 months ago

having the same issue here

VladislavSmolyanoy commented 2 weeks ago

any updates ??