Skip to content

fix(frontend): upcoming-purchase details dialog focuses the destructive Cancel Purchase button #1653

Closed

Description

@cristim

Summary

The upcoming-purchase details dialog puts initial focus on the destructive "Cancel Purchase" button.

Current behaviour

In the details dialog (frontend/src/dashboard.ts, ~line 720-745) "Cancel Purchase" is the first button. It opens a confirm, so one keypress cannot cancel anything, but focus should land on a safe control.

Steps to reproduce

  1. Open Home, then "View Details" on an upcoming purchase you can cancel.
  2. Observe the focused element.

Expected behaviour

Initial focus lands on "Close" (or the dialog heading).

Proposed fix

Focus #close-purchase-details-btn after opening, or place it first in DOM order, in frontend/src/dashboard.ts.

References

Discovered while reviewing #1598.

Severity

low

Activity

  1. added a commit that references this issue on Nov 4, 2026
    eb56472
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions