Fixed wrong focus and suggestion drop down delay

This commit is contained in:
Djeex
2025-09-04 12:11:58 +02:00
parent 9cdf6bbd32
commit b7fdcacf77

View File

@ -251,11 +251,9 @@ function renderTags(imgIndex, tags) {
}); });
input.addEventListener('blur', () => { input.addEventListener('blur', () => {
setTimeout(() => {
suggestionBox.style.display = 'none'; suggestionBox.style.display = 'none';
input.value = ''; input.value = '';
validateBtn.style.display = 'none'; validateBtn.style.display = 'none';
}, 150);
}); });
// --- Validate button action --- // --- Validate button action ---
@ -267,9 +265,10 @@ function renderTags(imgIndex, tags) {
validateBtn.style.display = 'none'; validateBtn.style.display = 'none';
} }
}; };
input.focus();
updateSuggestions(); updateSuggestions();
if (!input.value.trim()) {
suggestionBox.style.display = 'none';
}
} }
// --- Update tags in galleryImages array --- // --- Update tags in galleryImages array ---