Skip to content

Escape inside a dialog also cancels the editor interaction #11020

Description

@MitjaBezensek

Pressing Escape inside an open dialog in <Tldraw> closes the dialog, but the same keypress also reaches the editor and cancels the current interaction: the selection is cleared, or the active tool exits. Expected: Escape only closes the dialog, the way it already does for menus.

Repro

  1. In the examples app, select a shape.
  2. Press cmd+alt+/ (ctrl+alt+/ on Windows) to open the keyboard shortcuts dialog.
  3. Press Escape.
  4. The dialog closes and the shape is deselected.

tldraw.com doesn't seem to be affected, because its dialogs render outside the editor container. Same family as #11021: the editor's open-menu checks don't count dialogs.

Confidence: 85%, ready to get started.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    sdkAffects the tldraw sdk

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions