mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-25 21:16:21 +00:00
fix: relink search button (move outside content load listener)
This commit is contained in:
parent
714b4fcfa3
commit
cdc4f1a840
1 changed files with 12 additions and 14 deletions
|
@ -239,20 +239,18 @@ async function run() {
|
|||
}
|
||||
})
|
||||
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
const searchButton = document.getElementById("search-icon")
|
||||
searchButton.addEventListener('click', (evt) => {
|
||||
openSearch()
|
||||
})
|
||||
searchButton.addEventListener('keydown', (evt) => {
|
||||
openSearch()
|
||||
})
|
||||
searchContainer.addEventListener('click', (evt) => {
|
||||
closeSearch()
|
||||
})
|
||||
document.getElementById("search-space").addEventListener('click', (evt) => {
|
||||
evt.stopPropagation()
|
||||
})
|
||||
const searchButton = document.getElementById("search-icon")
|
||||
searchButton.addEventListener('click', (evt) => {
|
||||
openSearch()
|
||||
})
|
||||
searchButton.addEventListener('keydown', (evt) => {
|
||||
openSearch()
|
||||
})
|
||||
searchContainer.addEventListener('click', (evt) => {
|
||||
closeSearch()
|
||||
})
|
||||
document.getElementById("search-space").addEventListener('click', (evt) => {
|
||||
evt.stopPropagation()
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue