diff --git a/web/assets/js/sitesearch.js b/web/assets/js/sitesearch.js index bccf397511e542cccaf6291015ff701856b51cb5..1aebcf24a2782a019f9cb30eaa8ed7d9aa62aee6 100644 --- a/web/assets/js/sitesearch.js +++ b/web/assets/js/sitesearch.js @@ -12,4 +12,20 @@ $(document).ready(function () { document.querySelector('.pagefind-ui__search-input').focus(); }); + document.addEventListener('keydown', (event) => { + if (event.key == 'f') { + + const modals = document.querySelectorAll('#modal-2'); + modals.forEach(element => { + if (!element.classList.contains('is-open')) { + event.preventDefault(); + } + }); + + MicroModal.show('modal-2', { + onClose: function () { $('.nav-link-contact').blur(); }, + disableFocus: false + }); + } + }, false); });