This commit is contained in:
Thomas Chartron 2021-11-07 12:14:01 +01:00
parent fe9ea29b5d
commit 6da7a9b1bc

View file

@ -48,7 +48,9 @@ function toggleModal () {
modal.classList.toggle('pointer-events-none')
body.classList.toggle('modal-active')
if ([...body.classList].includes('modal-active')) {
document.getElementById('search-input').focus()
window.setTimeout(function() {
document.getElementById('search-input').focus()
}, 0);
}
}