Skip to content

Commit

Permalink
Merge pull request #182 from shafin-deriv/shafin/BOT-2591/fix-draggab…
Browse files Browse the repository at this point in the history
…le-console-errors

fix: draggable component stuck issue
  • Loading branch information
farabi-deriv authored Dec 10, 2024
2 parents fa25de9 + a042467 commit c34230a
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 c34230a

Please sign in to comment.