From 1e975425453b7b9a8166d7eb1b45d29b280a3505 Mon Sep 17 00:00:00 2001 From: Adam Sajko Date: Wed, 15 Oct 2025 10:09:24 +0200 Subject: [PATCH] fix: prevent animateOnMount from overriding running close animations --- src/components/bottomSheet/BottomSheet.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/bottomSheet/BottomSheet.tsx b/src/components/bottomSheet/BottomSheet.tsx index 6748c93c..f00028ad 100644 --- a/src/components/bottomSheet/BottomSheet.tsx +++ b/src/components/bottomSheet/BottomSheet.tsx @@ -962,6 +962,14 @@ const BottomSheetComponent = forwardRef( * then we evaluate on mount use cases. */ if (!isAnimatedOnMount.value) { + /** + * if there's a running animation (like force close), respect it and don't + * override with mount animation + */ + if (animationStatus === ANIMATION_STATUS.RUNNING) { + return; + } + /** * if animate on mount is set to true, then we animate to the propose position, * else, we set the position with out animation.