Skip to content

Dismiss the formatting menu when the text selection moves #255

Description

@bholmesdev

Problem

The editor can enter a stuck formatting state after opening the formatting menu for selected text.

Steps to reproduce

  1. Highlight text in a document.
  2. Press Cmd+/ to open the formatting menu.
  3. Click elsewhere in the document to move the text cursor.

Actual behavior

  • The original text selection remains highlighted.
  • The formatting menu remains open.
  • Pressing Escape does not dismiss the menu or clear the selection.

Expected behavior

Clicking anywhere else in the document should move the cursor, clear the previous text selection, and dismiss the Cmd+/ formatting menu.

Acceptance criteria

  • Clicking elsewhere in the document while the formatting menu is open closes the menu.
  • The previous selection is cleared and the caret moves to the clicked location.
  • The editor cannot remain in a state where the menu and stale selection are both stuck open.
  • Escape still dismisses the formatting menu when it is open.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-to-implementBehavior and scope are clear; ready for anyone to pick up and implement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions