Skip to content

Commit 5695b36

Browse files
authored
Add preventDefault to onDragEnter and onDragLeave for iPad (#3723)
1 parent 07976a3 commit 5695b36

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/@react-aria/dnd/src/useDrop.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ export function useDrop(options: DropOptions): DropResult {
164164
};
165165

166166
let onDragEnter = (e: DragEvent) => {
167+
e.preventDefault();
167168
e.stopPropagation();
168169
state.dragOverElements.add(e.target as Element);
169170
if (state.dragOverElements.size > 1) {
@@ -200,6 +201,7 @@ export function useDrop(options: DropOptions): DropResult {
200201
};
201202

202203
let onDragLeave = (e: DragEvent) => {
204+
e.preventDefault();
203205
e.stopPropagation();
204206

205207
// We would use e.relatedTarget to detect if the drag is still inside the drop target,

0 commit comments

Comments
 (0)