mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-25 13:06:22 +00:00
fix: dont hijack handlers when search is not focused (closes #680)
This commit is contained in:
parent
4014c4d6d6
commit
783b9b219c
1 changed files with 1 additions and 0 deletions
|
@ -110,6 +110,7 @@ document.addEventListener("nav", async (e: unknown) => {
|
|||
}
|
||||
|
||||
function shortcutHandler(e: HTMLElementEventMap["keydown"]) {
|
||||
if (!container?.classList.contains("active")) return
|
||||
if (e.key === "k" && (e.ctrlKey || e.metaKey) && !e.shiftKey) {
|
||||
e.preventDefault()
|
||||
const searchBarOpen = container?.classList.contains("active")
|
||||
|
|
Loading…
Reference in a new issue