Commit a5f5bc5
authored
fix: prevent scroll to top when switching tabs (#283)
Preserve scroll position when changing tabs by capturing scrollY before
navigation and restoring it after. This prevents the jarring scroll-to-top
behavior on both desktop and mobile when clicking tabs in slot/epoch detail
pages.
The fix uses requestAnimationFrame to ensure the scroll position is restored
after the browser has processed the URL change.1 parent f843c96 commit a5f5bc5
1 file changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
171 | 174 | | |
172 | 175 | | |
173 | 176 | | |
| |||
187 | 190 | | |
188 | 191 | | |
189 | 192 | | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
190 | 199 | | |
191 | 200 | | |
192 | 201 | | |
| |||
0 commit comments