Fix Safari file picker not firing after upload button click
This commit is contained in:
+5
-2
@@ -134,7 +134,7 @@
|
||||
<p>📁 Click to select files or drag and drop here</p>
|
||||
<p style="margin-top: 10px; font-size: 0.85em; color: #666;">Maximum file size: <span id="maxUploadSizeText"></span></p>
|
||||
<input type="file" id="fileInput" multiple>
|
||||
<button onclick="document.getElementById('fileInput').click()">Select Files</button>
|
||||
<button type="button" onclick="event.stopPropagation(); document.getElementById('fileInput').click()">Select Files</button>
|
||||
</div>
|
||||
<div class="progress-container" id="progressContainer">
|
||||
<div class="progress-bar" id="progressBar"></div>
|
||||
@@ -178,7 +178,10 @@
|
||||
results.replaceChildren(div);
|
||||
}
|
||||
|
||||
uploadArea.addEventListener('click', () => fileInput.click());
|
||||
uploadArea.addEventListener('click', (e) => {
|
||||
if (e.target.closest('button')) return;
|
||||
fileInput.click();
|
||||
});
|
||||
|
||||
uploadArea.addEventListener('dragover', (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user