diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index b252f67a..7488a4a0 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -36,7 +36,7 @@
}
});
- $('#search').addEventListener('shown.bs.modal', () => {
+ $('#search').on('shown.bs.modal', () => {
$('.pagefind-ui__search-input input').focus();
});
});