From 8d0bce029909135dd8350d014730233308d1bd55 Mon Sep 17 00:00:00 2001 From: Isaac Rowntree Date: Sat, 14 Nov 2026 10:35:09 +1100 Subject: [PATCH 1/2] fix(android): hand drags to a scrollable that mounts after the sheet presents BottomSheetBehavior looks for its nested scrolling child in onLayoutChild only. When scrollableRef's scroll view mounts after the sheet has presented (content that shows a loader first), setScrollableHandle turns nested scrolling on for it, but only a later layout tells the behavior about it. Today that layout comes from finalizeUpdates() adding the grabber view back, so with grabber={false} none follows. The behavior then drags the sheet itself. The scroll view's cancelled touch stream stops its nested scroll while the sheet is still at the expanded offset, which sets the state back from DRAGGING, and the release skips the dismissThreshold="short" rule: a short pull springs back. Request a layout when the handle changes, as containerViewScrollViewDidChange already does for a remounted scroll view. Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01UdycNhpCYe25QHqrd5wdkQ --- android/src/main/java/com/lodev09/truesheet/TrueSheetView.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/android/src/main/java/com/lodev09/truesheet/TrueSheetView.kt b/android/src/main/java/com/lodev09/truesheet/TrueSheetView.kt index a17d8ca3..9222e37c 100644 --- a/android/src/main/java/com/lodev09/truesheet/TrueSheetView.kt +++ b/android/src/main/java/com/lodev09/truesheet/TrueSheetView.kt @@ -365,6 +365,9 @@ class TrueSheetView(private val reactContext: ThemedReactContext) : if (viewController.scrollableHandle == handle) return viewController.scrollableHandle = handle setupScrollable() + // BottomSheetBehavior only looks for its nested scrolling child in onLayoutChild, and + // nothing else is sure to lay the sheet out after a handle that arrives once it is presented. + viewController.sheetView?.requestLayout() } fun setAbsoluteHeader(absolute: Boolean) { From df42690d071e630c82ea078fdf5a18b230a51c17 Mon Sep 17 00:00:00 2001 From: Isaac Rowntree Date: Sat, 14 Nov 2026 11:28:46 +1100 Subject: [PATCH 2/2] docs: add changelog entry for #1024 Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01UdycNhpCYe25QHqrd5wdkQ --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a868a370..09c30316 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### 🐛 Bug fixes + +- **Android**: A sheet with `grabber={false}` whose `scrollableRef` scroll view mounts after the sheet presents, such as content that shows a loader first, now closes on a short pull with `dismissThreshold="short"`. The pull used to spring back. ([#1024](https://github.com/lodev09/react-native-true-sheet/pull/1024) by [@isaacrowntree](https://github.com/isaacrowntree)) + ### 💡 Others - The Expo example in `example/expo` now runs SDK 58, and the SDK 57 example moves to `example/expo-57` (`yarn expo-57`). The bare example is upgraded to React Native 0.88. ([#1016](https://github.com/lodev09/react-native-true-sheet/pull/1016) by [@lodev09](https://github.com/lodev09))