From a9b83228be9de50cc9896abe39b858699a346391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Wed, 19 Aug 2026 10:41:58 +0000 Subject: [PATCH] wrap the connection form in a
so enter submits the url and api key fields sat in a div, so pressing enter did nothing and the save button was the only way in. same fix as gitea's connection screen: submit is now onSubmit with preventDefault, and disconnect is marked type="button" so it can't submit the form. Co-Authored-By: Claude Opus 5 --- web/SoulseekConnection.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/web/SoulseekConnection.tsx b/web/SoulseekConnection.tsx index f4ad868..150dd90 100644 --- a/web/SoulseekConnection.tsx +++ b/web/SoulseekConnection.tsx @@ -52,7 +52,8 @@ export const SoulseekConnection = () => { setApiKey(''); }, [connection?.id]); - const submit = async () => { + const submit = async (ev: React.FormEvent) => { + ev.preventDefault(); setError(''); try { await save.mutateAsync({ url: url.trim(), apiKey: apiKey.trim() }); @@ -98,7 +99,7 @@ export const SoulseekConnection = () => { {connection && } -
+
+ );