diff --git a/static/js/search.js b/static/js/search.js index d6d385e..e017140 100644 --- a/static/js/search.js +++ b/static/js/search.js @@ -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); } }