Merge pull request #102 from SuppliedOrange/patch-1
Fix double file browser opening issue
This commit is contained in:
@@ -377,8 +377,13 @@ function showFilename(filename) {
|
||||
|
||||
if (browseBtn) {
|
||||
// Clicking the button triggers file input
|
||||
browseBtn.addEventListener("click", () => fileInput.click());
|
||||
dropZone.addEventListener("click", () => fileInput.click());
|
||||
browseBtn.addEventListener("click", (e) => {
|
||||
e.stopPropagation();
|
||||
fileInput.click();
|
||||
});
|
||||
dropZone.addEventListener("click", () => {
|
||||
fileInput.click();
|
||||
});
|
||||
dropZone.addEventListener("dragover", (e) => {
|
||||
e.preventDefault();
|
||||
dropZone.style.boxShadow = "0 0 20px #9fef00";
|
||||
|
||||
Reference in New Issue
Block a user