Dismiss the palette on a tap/click outside it #49

Merged
pedromcaraujo merged 1 commit from palette-backdrop-dismiss into main 2026-10-17 11:38:56 +01:00

Summary

Phones have no Esc, so once the command palette was open there was no way to dismiss it without picking an item.

A click on the backdrop (outside the palette box) now calls closePalette(). It's click rather than pointerdown on purpose: the ☰ keybar button opens the palette on pointerdown, and that same tap's click targets the common ancestor (body), not the backdrop — so it can't re-close the palette instantly.

Test plan

  • Android: open via ☰, tap outside the box — palette closes
  • Android: tap inside the box / input — stays open
  • Desktop: click outside closes; Esc still works
## Summary Phones have no Esc, so once the command palette was open there was no way to dismiss it without picking an item. A `click` on the backdrop (outside the palette box) now calls `closePalette()`. It's `click` rather than `pointerdown` on purpose: the ☰ keybar button opens the palette on `pointerdown`, and that same tap's `click` targets the common ancestor (body), not the backdrop — so it can't re-close the palette instantly. ## Test plan - [ ] Android: open via ☰, tap outside the box — palette closes - [ ] Android: tap inside the box / input — stays open - [ ] Desktop: click outside closes; Esc still works
Dismiss the palette on a tap/click outside it
All checks were successful
CI / check (pull_request) Successful in 23s
91d0b7e019
Phones have no Esc, so once the palette was open there was no way out without picking an item. A click on the backdrop (outside the palette box) now closes it.
pedromcaraujo deleted branch palette-backdrop-dismiss 2026-10-17 11:38:56 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pedromcaraujo/forge!49
No description provided.