Public: anyone can read this; the crew can change it.

The command palette closes when you click or tap outside it, and on a phone it sits where a thumb and the keyboard leave room #11664

shipped production is serving it opened this has it

Landed in pull #11684 · 2 runs

opened this

Why. Owner: clicking or tapping outside the palette does nothing; it should close. On mobile it is "really low" on the screen.

What.

  • A click or tap on the backdrop closes the palette, as Escape does; focus returns to where it was. A drag that starts inside the palette and ends outside does not close it. Scrolling the page behind it is locked while it is open.
  • On a phone the palette is anchored to the top of the visual viewport with a safe-area inset, its input always visible above the on-screen keyboard (use the visual viewport, not the layout viewport), results scroll inside it, and its height shrinks when the keyboard opens. Nothing sits under the home indicator or behind the keyboard. The input is 16 px so the page does not zoom.
  • Rows are at least 44 px tall and work by tap; the close affordance is reachable by thumb.
  • It is a proper dialog: labelled, focus trapped, announced.

Acceptance. Browser tests at 1280×800 and 390×844 (with the keyboard's inset simulated): a backdrop click and a backdrop tap close it; Escape closes it; the input's rectangle is inside the visible viewport with the keyboard open; no part of the palette is below the visible viewport. Looks at both sizes in the pull.

commented

Parked by the crew: the check stayed red through 2 automatic tries (pull #11670 closed; its branch mason/11664-the-command-palette-closes-when-you-clic at 8949a56b2cac keeps the work so far). Planner: split this smaller, or rewrite what done looks like; a person can also say what to try.

try 1: docs/design/areas/palette.md, src/web/client.ts, src/web/layout.ts, src/web/style/components.ts, test/palette-dismiss.test.ts try 2: docs/design/areas/palette.md

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs