From a04246754322e73aeec32e2d96207cfafc8fdaf0 Mon Sep 17 00:00:00 2001 From: shafin-deriv Date: Tue, 10 Dec 2024 13:12:20 +0800 Subject: [PATCH] fix: draggable component stuck issue --- src/components/draggable/draggable.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/draggable/draggable.tsx b/src/components/draggable/draggable.tsx index 1f3d0f62..cb970c32 100644 --- a/src/components/draggable/draggable.tsx +++ b/src/components/draggable/draggable.tsx @@ -176,7 +176,11 @@ const Draggable: React.FC = ({ setIsDragging(false); isResizing.current = false; if (draggableContentBody?.style) { - Object.assign(draggableContentBody.style, previousStyle); + try { + Object.assign(draggableContentBody.style, previousStyle); + } catch { + draggableContentBody.style.pointerEvents = 'unset'; + } } if (boundaryRef) { window.removeEventListener('mousemove', handleMouseMove);