focus canvas

This commit is contained in:
Chris Wanstrath 2025-09-27 19:01:13 -07:00
parent 557e2a8a8d
commit c2f0e0a990
2 changed files with 5 additions and 1 deletions

View File

@ -71,6 +71,10 @@
color: var(--c64-dark-blue); color: var(--c64-dark-blue);
} }
canvas:focus {
outline: none;
}
a { a {
color: var(--cyan); color: var(--cyan);
} }

View File

@ -27,7 +27,7 @@ export function focusHandler(e: MouseEvent) {
const a = target.closest("a") const a = target.closest("a")
if (!a) { if (!a) {
if (target.tagName === "INPUT" || target.tagName === "TEXTAREA") if (target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.tagName === "CANVAS")
return false return false
const selection = window.getSelection() || "" const selection = window.getSelection() || ""