diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e62cbc..51e941e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ BottomSheet adheres to [Semantic Versioning](http://semver.org/). ### Changed +Fix half-opened bottom sheet when returning from background. + - 1.0.6 Removing List padding on examples. diff --git a/Sources/BottomSheet/BottomSheet.swift b/Sources/BottomSheet/BottomSheet.swift index d4b136b..576f859 100644 --- a/Sources/BottomSheet/BottomSheet.swift +++ b/Sources/BottomSheet/BottomSheet.swift @@ -91,7 +91,9 @@ public struct BottomSheet: View { .gesture( DragGesture() .onChanged({ (value) in - + // ignore gestures while the sheet is hidden. Otherwise it could collide with the iOS-global "go to homescreen"-gesture + guard isPresented else { return } + let offsetY = value.translation.height self.draggedOffset = offsetY