fix: snippet running on enter key
This commit is contained in:
1 parent
5f18a38eec
commit
2adb47e712
1 file changed
+5
@@ -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) => {
|
||||
|
||||
Reference in new issue
Block a user