fix: dont hijack handlers when search is not focused (closes #680)
This commit is contained in:
parent
4014c4d6d6
commit
783b9b219c
@ -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 New Issue
Block a user