borg-backup-ui icon indicating copy to clipboard operation
borg-backup-ui copied to clipboard

Prevent accidental dismissal of modals with unsaved input

Open borg-codex-bot opened this issue 3 months ago • 0 comments

Problem

Multi-step wizards and configuration modals can currently be dismissed by clicking the backdrop outside the dialog. A user reported losing all entered values after switching to another window with Alt+Tab and then accidentally triggering the backdrop dismissal when returning.

This is especially frustrating in long forms such as backup job creation and editing, where several steps may already contain unsaved input.

Goal

Protect unsaved form data from accidental dismissal while keeping deliberate close actions predictable and accessible.

Proposed behavior

  • Ignore backdrop clicks for multi-step wizards and configuration modals that contain user input.
  • Keep explicit close controls such as Cancel and the close button available.
  • When values have changed, require confirmation before discarding them through Cancel, the close button, or the Escape key.
  • Allow immediate closing when the form is unchanged.
  • Do not change lightweight informational or confirmation dialogs unless they contain unsaved input.
  • Apply the behavior consistently in both German and English.

Acceptance criteria

  • Clicking outside an affected modal does not close it.
  • Switching applications or browser tabs and returning does not discard the modal state.
  • Deliberate close actions remain available.
  • Dirty forms show a clear confirmation before values are discarded.
  • Continuing editing after declining the confirmation preserves all entered values and the current wizard step.
  • Job creation and job editing are covered by focused frontend tests.
  • Behavior is verified on desktop and mobile-sized viewports.

User impact

Prevents accidental loss of configuration work in long-running setup and edit workflows.

borg-codex-bot avatar Aug 30 '26 19:08 borg-codex-bot