Skip to content

fix(web): Escape closes only an agent pill's menu after a long press - #1054

Merged
badcuban merged 1 commit into
mainfrom
fix/agent-pill-touch-escape
Nov 23, 2026
Merged

badcuban merged 1 commit into
mainfrom
fix/agent-pill-touch-escape

Conversation

@badcuban

Copy link
Copy Markdown
Collaborator

Follow-up to #1050. After a long press opened an agent pill's menu in the model picker's phone drawer, Escape closed the whole drawer.

The mouse press the browser sends when the finger lifts lands outside the menu. The pill already cancelled the close that press asked for, but the press still moved the keyboard focus from the menu to the page, so Escape went to the drawer.

The pill now also prevents that press's default, which keeps the focus in the menu. Escape closes the menu and focus returns to the pill, the same as after a right-click.

The existing long-press browser test now checks that the lift's press is taken and that Escape leaves the drawer open. It fails on main. A press a test dispatches by hand has no default action, so the test can't replay the focus loss itself. That was confirmed with a local probe using real touches, which is not committed.

Not checked on a real phone.

After a long press opened an agent pill's menu in the model picker's phone
drawer, Escape closed the whole drawer.

The mouse press the browser sends when the finger lifts lands outside the
menu. The pill already cancelled the close that press asked for, but the
press still moved the keyboard focus from the menu to the page, so Escape
went to the drawer.

The pill now also prevents that press's default, which keeps the focus in
the menu. The long-press test checks that the press is taken and that
Escape leaves the drawer open.
@vercel

vercel Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
threadlines Skipped Skipped Nov 23, 2026 4:23pm UTC

Request Review

@badcuban
badcuban added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit f8a1c07 Nov 23, 2026
23 checks passed
@badcuban
badcuban deleted the fix/agent-pill-touch-escape branch November 23, 2026 16:35

This branch was previously deployed

1 inactive deployment
Preview — 875c557b Deployed Nov 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant