mirror of
https://github.com/alrayyes/wiki.git
synced 2025-05-01 06:28:14 +00:00
fix: use display instead of visibility for click handling pasthrough
This commit is contained in:
parent
5ab922f316
commit
a0b927da4a
2 changed files with 7 additions and 4 deletions
quartz/components/scripts
|
@ -188,7 +188,7 @@ document.addEventListener("nav", async (e: CustomEventMap["nav"]) => {
|
|||
removeAllChildren(preview)
|
||||
}
|
||||
if (searchLayout) {
|
||||
searchLayout.style.visibility = "hidden"
|
||||
searchLayout.classList.remove("display-results")
|
||||
}
|
||||
|
||||
searchType = "basic" // reset search type after closing
|
||||
|
@ -424,7 +424,7 @@ document.addEventListener("nav", async (e: CustomEventMap["nav"]) => {
|
|||
async function onType(e: HTMLElementEventMap["input"]) {
|
||||
if (!searchLayout || !index) return
|
||||
currentSearchTerm = (e.target as HTMLInputElement).value
|
||||
searchLayout.style.visibility = currentSearchTerm === "" ? "hidden" : "visible"
|
||||
searchLayout.classList.toggle("display-results", currentSearchTerm !== "")
|
||||
searchType = currentSearchTerm.startsWith("#") ? "tags" : "basic"
|
||||
|
||||
let searchResults: FlexSearch.SimpleDocumentSearchResultSetUnit[]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue