Skip to content

Commit dfb911f

Browse files
committed
fix: blur input fields when dragging. #186
1 parent 4580561 commit dfb911f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/drag-event-interactive/src/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ const Interactive = React.forwardRef<HTMLDivElement, InteractiveProps>((props, r
6565

6666
const handleMoveStart = useCallback(
6767
(event: React.MouseEvent | React.TouchEvent) => {
68+
const activeEl = document.activeElement as HTMLElement | null;
69+
activeEl?.blur();
6870
preventDefaultMove(event.nativeEvent);
6971
if (!isValid(event.nativeEvent)) return;
7072
if (!container.current) return;

0 commit comments

Comments
 (0)