mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-22 11:36:23 +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
|
@ -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[]
|
||||
|
|
|
@ -83,11 +83,14 @@
|
|||
}
|
||||
|
||||
& > #search-layout {
|
||||
display: flex;
|
||||
display: none;
|
||||
flex-direction: row;
|
||||
visibility: hidden;
|
||||
border: 1px solid var(--lightgray);
|
||||
|
||||
&.display-results {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
@media all and (min-width: $tabletBreakpoint) {
|
||||
&[data-preview] {
|
||||
& .result-card > p.preview {
|
||||
|
|
Loading…
Reference in a new issue