mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-23 03:56:23 +00:00
fix(search): oops restore ability to preview on hover lol
This commit is contained in:
parent
a2c46f442d
commit
9ff1fdd280
1 changed files with 9 additions and 0 deletions
|
@ -314,6 +314,15 @@ document.addEventListener("nav", async (e: CustomEventMap["nav"]) => {
|
||||||
if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) return
|
if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) return
|
||||||
hideSearch()
|
hideSearch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function onMouseEnter(ev: MouseEvent) {
|
||||||
|
if (!ev.target) return
|
||||||
|
const target = ev.target as HTMLInputElement
|
||||||
|
await displayPreview(target)
|
||||||
|
}
|
||||||
|
|
||||||
|
itemTile.addEventListener("mouseenter", onMouseEnter)
|
||||||
|
window.addCleanup(() => itemTile.removeEventListener("mouseenter", onMouseEnter))
|
||||||
itemTile.addEventListener("click", handler)
|
itemTile.addEventListener("click", handler)
|
||||||
window.addCleanup(() => itemTile.removeEventListener("click", handler))
|
window.addCleanup(() => itemTile.removeEventListener("click", handler))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue