Fix invisible preset file input overlay blocking click interactions

This commit is contained in:
Jannik committed 2026-08-08 16:15:45 +02:00
1 parent 7e7193090e
commit a65b5f73d1
3 files changed
+18 -10

No files matched your search

+8
View File
@@ -91,6 +91,7 @@
const btnSavePreset = document.getElementById('btnSavePreset');
const btnExportPresetJson = document.getElementById('btnExportPresetJson');
const btnImportPresetJson = document.getElementById('btnImportPresetJson');
const importPresetInput = document.getElementById('importPresetInput');
// Generate Default Synthwave Cover
@@ -1894,6 +1895,13 @@
a.click();
});
if (btnImportPresetJson) {
btnImportPresetJson.addEventListener('click', () => {
importPresetInput.value = '';
importPresetInput.click();
});
}
importPresetInput.addEventListener('change', (e) => {
if (e.target.files.length) {
const reader = new FileReader();
+4 -6
View File
@@ -1061,12 +1061,10 @@
<div class="panel-section">
<h3 class="section-title">Eigene Presets</h3>
<div class="preset-manager-controls">
<button id="btnSavePreset" class="btn btn-secondary btn-sm">Speichern</button>
<button id="btnExportPresetJson" class="btn btn-secondary btn-sm">Exportieren (.json)</button>
<label class="btn btn-secondary btn-sm">
Importieren (.json)
<input type="file" id="importPresetInput" accept=".json" class="file-input-hidden">
</label>
<button type="button" id="btnSavePreset" class="btn btn-secondary btn-sm">Speichern</button>
<button type="button" id="btnExportPresetJson" class="btn btn-secondary btn-sm">Exportieren (.json)</button>
<button type="button" id="btnImportPresetJson" class="btn btn-secondary btn-sm">Importieren (.json)</button>
<input type="file" id="importPresetInput" accept=".json" class="file-input-hidden">
</div>
</div>
</div>
+6 -4
View File
@@ -1023,10 +1023,12 @@ body {
}
.file-input-hidden {
position: absolute;
inset: 0;
opacity: 0;
cursor: pointer;
display: none !important;
pointer-events: none !important;
width: 0 !important;
height: 0 !important;
opacity: 0 !important;
position: absolute !important;
}
.file-badge {