From 29f48c26006360e74756bd99a038c0cedd4a6782 Mon Sep 17 00:00:00 2001 From: Aaron Ge Date: Mon, 13 May 2024 16:23:48 -0400 Subject: [PATCH] Fixed drag and drop functionality --- javascript/main2.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/javascript/main2.js b/javascript/main2.js index 2e047de..a9ad022 100644 --- a/javascript/main2.js +++ b/javascript/main2.js @@ -1319,6 +1319,8 @@ document.querySelectorAll("input[type='number']").forEach((e) => { e.stopPropagation(); const dt = e.dataTransfer; const files = dt.files; + document.getElementById("imageUrlInput").value = null; + document.getElementById("fileInput").files = files; handleImageLoad(files[0], () => segmentImage(true)); }; });