diff --git a/src/js/vendor/search.bundle.js b/src/js/vendor/search.bundle.js index 46cf32d..595ab85 100644 --- a/src/js/vendor/search.bundle.js +++ b/src/js/vendor/search.bundle.js @@ -109,6 +109,13 @@ ` }) .join('') + + container.querySelectorAll('ul a').forEach((a) => { + a.addEventListener('click', () => { + MicroModal.close('modal-1') + }) + }) + if (!lastRenderArgs.isLastPage) { const more = document.createElement('div') const link = document.createElement('a') @@ -149,6 +156,7 @@ const hits = document.querySelectorAll('#hits>ul>li>a') if (hits[index]) { hits[index].click() + MicroModal.close('modal-1') } }