Prevent default on drag over for file upload (#1623)

This commit is contained in:
Shuchang Zheng
2025-01-23 05:01:30 +08:00
committed by GitHub
parent 31885113a4
commit 81a0eaaeb0

View File

@@ -126,6 +126,9 @@ function FileUpload({ value, onChange }: Props) {
className={cn(
"flex w-full cursor-pointer items-center justify-center border border-dashed py-8 hover:border-slate-500",
)}
onDragOver={(event) => {
event.preventDefault();
}}
onDrop={(event) => {
event.preventDefault();
event.stopPropagation();