From e6736276f3d1ed200cec19f171d53b06156e67f6 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Tue, 31 Mar 2026 04:41:03 +0200 Subject: [PATCH] Add function to blur active text entry in App.tsx --- src/app/App.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/app/App.tsx b/src/app/App.tsx index 840a452b..cebcc6ac 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -287,6 +287,16 @@ function isCommitIncrementKey(key: string): boolean { return key === "ArrowUp" || key === "ArrowDown" || key === "PageUp" || key === "PageDown"; } +function blurActiveTextEntry() { + const activeElement = document.activeElement; + + if (!isTextEntryTarget(activeElement)) { + return; + } + + activeElement.blur(); +} + function sortDocumentMaterials(materials: Record): MaterialDef[] { return Object.values(materials).sort((left, right) => { const leftStarterIndex = STARTER_MATERIAL_ORDER.get(left.id) ?? Number.MAX_SAFE_INTEGER;