From 5c386148a42bffd6b954754ccce8e3babe202e77 Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Thu, 3 Aug 2023 18:25:29 +0500 Subject: [PATCH] editor: fix action sheets not opening --- packages/editor/src/components/action-sheet/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/editor/src/components/action-sheet/index.tsx b/packages/editor/src/components/action-sheet/index.tsx index 8a4e19709..1523daf98 100644 --- a/packages/editor/src/components/action-sheet/index.tsx +++ b/packages/editor/src/components/action-sheet/index.tsx @@ -158,7 +158,7 @@ export function ActionSheetPresenter( onRequestClose={() => onBeforeClose()} portalClassName={"bottom-sheet-presenter-portal"} onAfterOpen={() => { - animation.start({ transition: TRANSITION, y: 0 }); + setTimeout(() => animation.start({ transition: TRANSITION, y: 0 })); }} overlayElement={(overlayElementProps, contentEl) => { return ( @@ -250,7 +250,9 @@ export function ActionSheetPresenter( if (y.get() >= closingHeight) { onBeforeClose(); } else { - animation.start({ transition: TRANSITION, y: 0 }); + setTimeout(() => + animation.start({ transition: TRANSITION, y: 0 }) + ); } }} dragConstraints={{ top: 0, bottom: 0 }}