diff --git a/packages/libeufin-bank-webui/src/pages/OperationState/views.tsx b/packages/libeufin-bank-webui/src/pages/OperationState/views.tsx index 5009adc5a..641986ff4 100644 --- a/packages/libeufin-bank-webui/src/pages/OperationState/views.tsx +++ b/packages/libeufin-bank-webui/src/pages/OperationState/views.tsx @@ -175,7 +175,13 @@ export function NeedConfirmationView({ return; } if (!dialog.open) dialog.showModal(); - titleRef.current?.focus(); + // Start in the field the user has to fill when there is one: the cash + // amount, or the password when signing in first (the sign-in form's + // own focus ran before the dialog was shown). Otherwise the title. + const field = dialog.querySelector( + "input:not([readonly]):not([disabled])", + ); + (field ?? titleRef.current)?.focus(); }; openDialog(); return () => {