From 2adb47e7125e80276a0001c766b13668e01ce952 Mon Sep 17 00:00:00 2001 From: LukeGus Date: Sat, 20 Dec 2025 02:07:07 -0600 Subject: [PATCH] fix: snippet running on enter key --- src/ui/desktop/apps/tools/SSHToolsSidebar.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ui/desktop/apps/tools/SSHToolsSidebar.tsx b/src/ui/desktop/apps/tools/SSHToolsSidebar.tsx index 0ee5b574..ca36a8a0 100644 --- a/src/ui/desktop/apps/tools/SSHToolsSidebar.tsx +++ b/src/ui/desktop/apps/tools/SSHToolsSidebar.tsx @@ -725,6 +725,11 @@ export function SSHToolsSidebar({ onSnippetExecute(snippet.content); toast.success(t("snippets.executeSuccess", { name: snippet.name })); } + + // Remove focus from any active element in the sidebar to prevent accidental re-execution + if (document.activeElement instanceof HTMLElement) { + document.activeElement.blur(); + } }; const handleCopy = (snippet: Snippet) => {