Skip to content

Escape cancels dictation before closing an image enlarged on top of it #41632

Done

Description

@bdamokos

What happened

While dictating, I enlarged an inline chat image with its magnifier. The first Escape stopped the dictation and the second closed the image. I expected the opposite order: Escape should close the most recently opened layer first.

This may be a deliberate choice, but the costs are lopsided. Losing a dictation by accident is very annoying because the recording is gone. Closing an image by accident costs almost nothing because it reopens with one click. When Escape could mean either, it should close the media.

Diagnosis

useDictationShortcut (apps/web/src/speech/useDictationShortcut.ts) listens for Escape on the window in the capture phase, so it runs before anything else. While dictation is active it cancels the recording and stops the key from going further. Its only exception is for other dictation editors or the dialogs that host them (inOtherShortcutTarget). The expanded image dialog (ExpandedImageDialog) has no dictation editor, so it never receives that first Escape.

Possible fix: also hand Escape to any open modal dialog or popup that opened after the recording started (and is above it in the layer stack), instead of only to dialogs that host editors.

Separately, the modal viewer blocks the mic button, while the mod+shift+d dictation shortcut has no dialog check. Clicking and the shortcut should behave the same way while a modal is open.

Steps to reproduce

  1. In a thread with an inline image, start dictation.
  2. Hover the image and click the magnifier to enlarge it.
  3. Press Escape: dictation stops and the image stays open.
  4. Press Escape again: the image closes.

Controls: with no dictation running, one Escape closes the image. With no image open, Escape stops dictation. Both are correct.

Version

0.1.12-nightly.20261123.5151

Environment

Desktop app (nightly), macOS arm64, local server.

Related issues

None found (searched "dictation escape", "dictation image").

Agent

Claude Code (claude-opus-5-5) in T3 Code, following the triage playbook.

Activity

  1. added
    via-triage
    on Nov 23, 2026
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

    via-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions