From b7ba2d3f0f44f9ddb0f764efffb094c00702b1aa Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Mon, 2 Mar 2026 11:13:50 +0200 Subject: [PATCH] set isClosing before cancel() to prevent content observer fighting dismiss Co-Authored-By: Claude Opus 4.6 (1M context) --- .../src/main/java/expo/modules/bottomsheet/BottomSheetView.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/bottom-sheet/android/src/main/java/expo/modules/bottomsheet/BottomSheetView.kt b/modules/bottom-sheet/android/src/main/java/expo/modules/bottomsheet/BottomSheetView.kt index 5f365106ee..1a1af8e6a8 100644 --- a/modules/bottom-sheet/android/src/main/java/expo/modules/bottomsheet/BottomSheetView.kt +++ b/modules/bottom-sheet/android/src/main/java/expo/modules/bottomsheet/BottomSheetView.kt @@ -331,6 +331,9 @@ class BottomSheetView( fun dismiss() { val dialog = this.dialog ?: return + // Mark as closing so the content observer doesn't fight the dismiss + // animation by calling updateLayout() mid-hide. + this.isClosing = true // Temporarily make cancelable so cancel() works — cancel() gives the // slide-out animation, while dismiss() does a plain fade. dialog.setCancelable(true)