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

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

Open
chichkanov opened this issue Apr 11, 2024 · 1 comment

Comments

@chichkanov
Copy link

chichkanov commented Apr 11, 2024

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.

Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-04-11.at.14.31.41.mp4
@TomKowalczuk
Copy link

having the same issue here

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