From 82b93be2d2b989f5be4adc702f8bcd94882bd101 Mon Sep 17 00:00:00 2001 From: Jukka Hietanen Date: Thu, 22 Feb 2024 01:49:33 +0200 Subject: [PATCH] Use highPriorityGesture for drag (#153) highPriorityGesture is required to make dragging the bottom sheet work even when user starts dragging on buttons or other pressable items --- .../BottomSheetView/BottomSheetView+HelperViews.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/BottomSheet/BottomSheetView/BottomSheetView+HelperViews.swift b/Sources/BottomSheet/BottomSheetView/BottomSheetView+HelperViews.swift index 9064e2d6..8ccb6b06 100644 --- a/Sources/BottomSheet/BottomSheetView/BottomSheetView+HelperViews.swift +++ b/Sources/BottomSheet/BottomSheetView/BottomSheetView+HelperViews.swift @@ -181,7 +181,8 @@ internal extension BottomSheetView { // Main content self.mainContent // Make the main content drag-able if content drag is enabled - .gesture( + // highPriorityGesture is required to make dragging the bottom sheet work even when user starts dragging on buttons or other pressable items + .highPriorityGesture( self.configuration.isContentDragEnabled && self.configuration.isResizable ? self.dragGesture(with: geometry) : nil )