From 146dd77b83a26c57b5070a391e3e8edf4ab017b9 Mon Sep 17 00:00:00 2001 From: Calcium-Ion Date: Tue, 19 May 2026 16:40:11 +0800 Subject: [PATCH] fix(keys): call submit handler directly to avoid stale form linkage (#4858) (#4967) Users reported that the API key edit drawer's "Save changes" button becomes unresponsive after the drawer has been open / idle for a while: no loading state, no request, no error. Reopening the drawer restores it because a fresh DOM is created. The button lived in `SheetFooter` (a portaled Base UI Sheet) and was linked to the form via the HTML `form='api-key-form'` attribute. Once the portal/DOM relationship goes stale, the click no longer triggers the form's submit event, hence the silent failure. Defensive fix: drop the cross-DOM `form` linkage and call `form.handleSubmit(onSubmit)` directly via `onClick`. The native submit path (Enter key, original `
`) is preserved. Closes #4858 --- .../src/features/keys/components/api-keys-mutate-drawer.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/default/src/features/keys/components/api-keys-mutate-drawer.tsx b/web/default/src/features/keys/components/api-keys-mutate-drawer.tsx index e3f8d556..cc21e801 100644 --- a/web/default/src/features/keys/components/api-keys-mutate-drawer.tsx +++ b/web/default/src/features/keys/components/api-keys-mutate-drawer.tsx @@ -610,8 +610,8 @@ export function ApiKeysMutateDrawer({ {t('Close')}