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) {
|
if (browseBtn) {
|
||||||
// Clicking the button triggers file input
|
// Clicking the button triggers file input
|
||||||
browseBtn.addEventListener("click", () => fileInput.click());
|
browseBtn.addEventListener("click", (e) => {
|
||||||
dropZone.addEventListener("click", () => fileInput.click());
|
e.stopPropagation();
|
||||||
|
fileInput.click();
|
||||||
|
});
|
||||||
|
dropZone.addEventListener("click", () => {
|
||||||
|
fileInput.click();
|
||||||
|
});
|
||||||
dropZone.addEventListener("dragover", (e) => {
|
dropZone.addEventListener("dragover", (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
dropZone.style.boxShadow = "0 0 20px #9fef00";
|
dropZone.style.boxShadow = "0 0 20px #9fef00";
|
||||||
|
|||||||
Reference in New Issue
Block a user