Commit a1ba71d
authored
🤖 fix: use double RAF in jumpToBottom for reliable scroll position (#887)
When switching workspaces, `jumpToBottom` was executing synchronously
before browser layout was complete. This caused scrolling to land
'almost at the bottom' instead of fully at the bottom.
The fix uses double `requestAnimationFrame` (matching
`performAutoScroll`):
- First frame: allows DOM updates to complete
- Second frame: measures accurate `scrollHeight` after layout
`setAutoScroll(true)` is set immediately to prevent flicker of the 'jump
to bottom' button.
---
_Generated with `mux`_1 parent 055145c commit a1ba71d
2 files changed
+16
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
45 | 53 | | |
46 | 54 | | |
47 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
| |||
0 commit comments