Skip to content

Commit

Permalink
Fix close button
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-fox committed Nov 25, 2023
1 parent c78da83 commit 17353d6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion resource/lunr-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
return `<article role="article">
<div class="modal-header">
<h1>@@@lunr.search.results@@@</h1>
<button type="button" class="btn-close" aria-label="Close" onclick="closeSearch(this);"></button>
<button type="button" class="btn-close search-close" aria-label="Close"></button>
</div>
<div class="modal-body">
${parseLunrResults(results)}
Expand Down Expand Up @@ -108,6 +108,9 @@

elements[0].classList.add("collapse");
window.scrollTo(0, 0);

const closeBox = document.getElementsByClassName("search-close")[0];
closeBox.addEventListener("click", closeSearch);
return false;
})
.catch((e) => {
Expand Down

0 comments on commit 17353d6

Please sign in to comment.