From a8f8c42f9f4bb4c69c2fe67bf9516fdd661da02c Mon Sep 17 00:00:00 2001 From: n30nex Date: Sun, 27 Sep 2026 01:34:21 -0400 Subject: [PATCH] Focus Finder within its opening gesture to prevent menu races --- web/src/main.ts | 2 +- web/src/netgraph/main.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/main.ts b/web/src/main.ts index 9816906..726cc5a 100644 --- a/web/src/main.ts +++ b/web/src/main.ts @@ -410,7 +410,7 @@ async function start(): Promise { closeSoundPanel(); setLayersOpen(false); renderNodeSearch(); - window.requestAnimationFrame(() => nodeSearch.focus()); + nodeSearch.focus(); }); let wasHidden = document.hidden; document.addEventListener('visibilitychange', () => { diff --git a/web/src/netgraph/main.ts b/web/src/netgraph/main.ts index fcb6326..e2015a5 100644 --- a/web/src/netgraph/main.ts +++ b/web/src/netgraph/main.ts @@ -349,7 +349,7 @@ function wireSearch(renderer: NetgraphRenderer, select: (nodeID: string) => void closeSoundPanel(); closeDisplay(); renderResults(); - requestAnimationFrame(() => nodeSearch.focus()); + nodeSearch.focus(); }); }