Skip to content

Multiple modals stack up when using command component in demo #230

@jeanlucaslima

Description

@jeanlucaslima

When using the command component, invoking it with cmd + K multiple times causes the modals to stack up. Pressing the ESC key only dismisses one modal, and subsequent presses of the ESC key have no effect, leaving the remaining modals stuck and impossible to dismiss.

Steps to Reproduce

  • Open the command component.
  • Trigger the component using cmd + K.
  • Repeat the cmd + K command multiple times (e.g., 3–4 times).
  • Attempt to dismiss the stacked modals by pressing the ESC key.

Expected Behavior

Option 1

Pressing the ESC key should dismiss all modals at once, or at least allow repeated presses of ESC to dismiss any remaining active modals.

Option 2

Triggering the component with cmd + K should only invoke a single modal. If the modal is already open, subsequent cmd + K presses should either:

  • Dismiss the existing modal, or
  • Refocus the existing modal without creating duplicates
    (bonus if there's a visual indication the modal was called again with some user feedback like an animation)

Actual Behavior

Pressing the ESC key dismisses only the most recently triggered modal. Any further attempts to dismiss remaining modals by pressing ESC do not work.

Additional Information

Browser: Chrome
Version: 134.0.6998.89 (Official Build) (x86_64)
OS: macOS Version 15.3.2 (Build 24D81)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions