Commit fa08d9c
committed
fix(code): preserve session scroll position across window focus
The visibilitychange handler in ConversationView unconditionally scrolled
the conversation to the bottom whenever the document became visible again,
so cmd+tab away and back would always destroy the user's reading position.
Gate the scroll on the same at-bottom state already reported by
VirtualizedList, so we only re-pin to the bottom when the user was already
following the stream. Manual scroll positions now survive focus changes.
Generated-By: PostHog Code
Task-Id: 2297f0c5-16fb-475d-8a2b-13cbcae500dd1 parent d7b8cbb commit fa08d9c
1 file changed
Lines changed: 3 additions & 1 deletion
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
| 133 | + | |
132 | 134 | | |
133 | 135 | | |
134 | 136 | | |
| |||
139 | 141 | | |
140 | 142 | | |
141 | 143 | | |
142 | | - | |
| 144 | + | |
143 | 145 | | |
144 | 146 | | |
145 | 147 | | |
| |||
0 commit comments