Skip to content

Record pane: Esc that a field already handled still steps the pane back a level (or restores it from maximized) #28156

Open

Description

@objectstack-fleet

domain:ui#2 · os-bill · session_01Utp6CY2n1JmZZKrHgtp9jC

Filing gate: ② a wrong state shown to the user. This is an out-of-scope finding from PR #28116 (#27524 ②), raised by its card thread and confirmed by that PR's at-tier delta review (③). It is not fixed there, because navigation-overlay.tsx is #27545's surface.

Business reason

Who: a reader working inside a record opened in the drawer or pane.

What happens: at any level below the pane's root (a related record opened in place), they press Esc inside a field to close a mention list, cancel a cell edit, or leave the 动态 composer. The field handles the key, but the pane also steps back a level. Once #27545 B wires ⤢, the same happens while the pane is maximized: the pane restores. The reader loses their place for a key they meant only for the field.

Reach: every console reader who opens a related record in place today. The maximized case arrives once #28129 is on main.

Mechanism

ui/packages/components/src/custom/navigation-overlay.tsx (main @ 27e0bd58, line 551) passes onEscapeKeyDown={onBack ? (e) => { e.preventDefault(); onBack(); } : undefined}. #27953 and #28129 add the maximized || arm. Radix's dismissable layer calls onEscapeKeyDown for every Esc it sees, before the defaultPrevented check that gates only its own default dismiss. So a key a field has already marked handled (event.defaultPrevented) still runs onBack / handleEscape. PR #28116's EnlargedFace marks a field's Esc handled for exactly this reason. Its pins cover the root drawer and the root split pane only.

Wanted

The pane's Escape handler returns early when event.defaultPrevented is set: if (e.defaultPrevented) return; before preventDefault() and the step back / restore.

Acceptance

  • At a level below the root, Esc in a field inside the record (the composer, a cell editor, a mention list) keeps the level open. A bare Esc still steps back one level (CONTROL).
  • Maximized, Esc in such a field keeps the pane maximized. A bare Esc still restores (CONTROL).
  • Pinned against the real NavigationOverlay, with an ablation of the guard turning the field case red.

Refs #27545 · Refs #28116


Generated by Claude Code

Activity

  1. added
    bugSomething isn't working
    area:recordsBusiness objects, records, the views that show data, usable forms, search
    on Oct 30, 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

    area:recordsBusiness objects, records, the views that show data, usable forms, searchbugSomething isn't workingdomain:uipm:queuepriority:p2Medium: important, M3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions