Commit eb7d041
Fix chat auto-scroll on touch devices (iOS) (#2390)
* fix(chat): use instant scroll on touch to land the spacer pin on iOS
On send, the chat inflates a tall bottom spacer and scrolls to the bottom so
the just-sent user message pins near the top (ChatGPT-style). That scroll was
issued with behavior: "smooth". On iOS, WebKit suppresses/defers programmatic
scrolls during touch/momentum, and the deferred smooth animation only plays
out once the gesture and stream settle — i.e. the view visibly scrolls up
right as the reply finishes.
Use an instant scroll on touch devices (pointer: coarse) so the spacer that
was added is snapped into view immediately on send, with no late animation.
Desktop keeps its smooth pin. The mobile pin behaviour itself is preserved.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DZA6zBsc61PSuo8kg4yRB7
* fix(chat): use any-pointer:coarse so hybrid touch devices snap on send
pointer:coarse only reflects the primary pointer, so a hybrid device (touch
laptop, iPad with a trackpad) reports fine and keeps the smooth scroll that
WebKit defers when touch-scrolling. Switch to any-pointer:coarse so any
touch-capable device snaps to the bottom immediately on send.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DZA6zBsc61PSuo8kg4yRB7
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent f98711a commit eb7d041
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | | - | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
341 | 347 | | |
342 | 348 | | |
343 | 349 | | |
| |||
0 commit comments