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) => {