Skip to content

Commit

Permalink
fix: draggable component stuck issue
Browse files Browse the repository at this point in the history
  • Loading branch information
shafin-deriv committed Dec 10, 2024
1 parent 4d7f24a commit a042467
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/draggable/draggable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,11 @@ const Draggable: React.FC<TDraggableProps> = ({
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);
Expand Down

0 comments on commit a042467

Please sign in to comment.