Skip to content

fix(chat): stabilize iOS Safari focus, replies, and drawer background - #925

Merged
sean-brydon merged 5 commits into
mainfrom
t3/ios-safari-chat-input-investigation
Nov 17, 2026
Merged

sean-brydon merged 5 commits into
mainfrom
t3/ios-safari-chat-input-investigation

Conversation

@pasqualevitiello

@pasqualevitiello pasqualevitiello commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fix the chat drawer’s first-focus jump and inconsistent keyboard dismissal on iOS Safari, reveal newly sent quoted replies, and keep the background beneath Safari’s address bar matched to bottom drawers.

Empty editor focus → initialize the caret before focusin
Send → preserve editor focus on pointerdown and compatibility mousedown
Reply preview exit → recompute the reading position only after Cancel
Bottom drawer → add Base UI’s fixed background fill beneath the popup

Registry sources, package copies, and generated registry entries are synchronized. Existing drafts, mobile Return behavior, and drawer animation timing are preserved.

Evidence

  • Before: On a real iPhone, first focus moved the drawer, later sends dismissed the keyboard, and sending a quoted reply could leave the new message offscreen.
    After: Verified on the connected iPhone running iOS 27.2.1: no first-focus jump; editing an existing draft works; repeated sends keep the keyboard open; Reply opens the keyboard; Cancel retains the draft; sending a quoted reply reveals it.
  • Before: Reopening the drawer could leave a differently colored area beneath Safari’s address bar.
    After: The user confirmed matching background and correct restoration after closing. The browser-controlled area remains stationary/fades, as in the official Base UI example.
  • bun run test: 58 passed, 0 failed, including caret preservation, repeated sends, and reply send/cancel regression coverage. The reply-scroll regression failed before the fix and passes afterward.
  • TypeScript checks, registry dependency validation, and the UI production build passed. Pre-commit and pre-push hooks completed.

Merge Danger

Door: two-way

Revertible UI changes; no migrations or public API changes.

Blast Radius: components

Composer focus behavior affects shared rich-text composers. The background fill affects bottom drawers; inset drawers hide it at the desktop breakpoint. Reply-scroll changes apply to the full demo and inline preview.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
coss-com Ready Ready Preview Nov 17, 2026 10:31am UTC
coss-com-origin Ready Ready Preview Nov 17, 2026 10:31am UTC
coss-com-ui Ready Ready Preview Nov 17, 2026 10:31am UTC
coss-examples-calcom Ready Ready Preview Nov 17, 2026 10:31am UTC

Request Review

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@linear-code

linear-code Bot commented Nov 17, 2026

Copy link
Copy Markdown

PRO-5407

@sean-brydon
sean-brydon merged commit b2336c4 into main Nov 17, 2026
13 checks passed
@sean-brydon
sean-brydon deleted the t3/ios-safari-chat-input-investigation branch November 17, 2026 16:30

This branch was successfully deployed

4 active deployments
Preview – coss-com-ui — 39074415 Deployed Nov 17, 2026 by vercel[bot]
Preview – coss-com-origin — 39074415 Deployed Nov 17, 2026 by vercel[bot]
Preview – coss-com — 39074415 Deployed Nov 17, 2026 by vercel[bot]
Preview – coss-examples-calcom — 39074415 Deployed Nov 17, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants