fix: snippet running on enter key

This commit is contained in:
LukeGus
2025-12-20 02:07:07 -06:00
parent 5f18a38eec
commit 2adb47e712

View File

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