don't worry about links

This commit is contained in:
Chris Wanstrath 2025-09-28 16:32:00 -07:00
parent 1197af67ef
commit 960f92b829

View File

@ -23,11 +23,7 @@ export function focusHandler(e: MouseEvent) {
return
}
// let them click on links
const a = target.closest("a")
if (!a) {
if (target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.tagName === "CANVAS")
if (["INPUT", "TEXTAREA", "CANVAS", "A"].includes(target.tagName))
return false
const selection = window.getSelection() || ""
@ -35,6 +31,4 @@ export function focusHandler(e: MouseEvent) {
focusInput()
e.preventDefault()
return true
}
}