diff --git a/packages/react/components/Drawer.tsx b/packages/react/components/Drawer.tsx index 0b51c5d..7a1c05b 100644 --- a/packages/react/components/Drawer.tsx +++ b/packages/react/components/Drawer.tsx @@ -272,16 +272,11 @@ const DrawerContent = forwardRef( }; }); - if ( - e.target instanceof Element && - internalRef.current && - internalRef.current.contains(e.target) - ) { + if (internalRef.current) { const size = ["top", "bottom"].includes(position) - ? e.target.getBoundingClientRect().height - : e.target.getBoundingClientRect().width; + ? internalRef.current.getBoundingClientRect().height + : internalRef.current.getBoundingClientRect().width; const movePercentage = dragState.delta / size; - setState((prev) => ({ ...prev, movePercentage: ["top", "left"].includes(position)