diff --git a/dashboard/web/components/Dialog.tsx b/dashboard/web/components/Dialog.tsx index 19872a085f8ec460d5679d1afb73d6f6048ebdb4..9a85165ec68fd75f00182ed224bd83779dbf5cfa 100644 --- a/dashboard/web/components/Dialog.tsx +++ b/dashboard/web/components/Dialog.tsx @@ -41,10 +41,7 @@ const SHAKE = [0, -8, 8, -8, 8, -8, 8, 0].map((x) => ({ transform: `translateX($ const reduced = matchMedia("(prefers-reduced-motion: reduce)"); let dialogs = 0; -/** - * Enter confirms and Esc, the backdrop, and "back" cancel. Confirm starts focused unless the body has an - * `autofocus` field; the browser checks the body's constraints (`required`, `pattern`…) before `onConfirm` runs. - */ +/** Destructive confirmations focus back; fields with autofocus take precedence. */ export const showConfirmDialog = (options: DialogOptions) => open(options); /** Like showConfirmDialog with a text field; Enter submits once `validateInput` passes. */ @@ -120,10 +117,10 @@ function open(options: DialogOptions, field?: TextDialogOptions) {
{body}
- + {/* aria-disabled rather than disabled while pending, so focus stays put for a retry. */}