You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Keep focus in the Backup/Restore/Import dialogs when a run starts #798
Severity: P1 (keyboard users lose the dialog mid-run)
What happens
Open ?mock=connected. Toolbar → Backup, pick database shop, Browse.
Tab to the Backup button and press Enter.
Focus drops to <body>. Escape does nothing, and the next Tab lands on the "File" menu behind the dialog — the focus trap is gone while the dialog is still open. The same happens in Restore (the Restore button becomes disabled "Restoring...") and in Import (SQL mode: every control in the dialog is disabled during the run, so Escape does not close it either).
Cause
src/components/backup/BackupDialog.tsx:640-662 swaps the footer for a Cancel button, unmounting the focused button.
src/components/backup/RestoreDialog.tsx:425 and src/components/import/ImportDialog.tsx:735-752 disable the focused button.
src/components/common/Modal.tsx:121 handles Escape and Tab in the panel's onKeyDown, so once focus is on <body> neither fires.
Fix
When a run starts, move focus to the Cancel button (or the role="status" progress region with tabIndex=-1). In Modal, also listen for Escape/Tab on document while open, and pull focus back into the panel if it has escaped.
Activity
fix(ui): keep focus in run dialogs when a run starts
release: 1.4.0 (#871)