Commit 82a6a91
committed
fix: prevent scroll snapback when using Space/PgUp/PgDown
The useLayoutEffect that scrolls the selected hunk into view was firing
whenever selectedEstimatedScrollTop changed, which happens during normal
scrolling when agent notes are visible (metrics recalculate as viewport
changes).
Fix: Track previous selectedAnchorId and only auto-scroll when the
selection actually changes, not when layout metrics update during
free scrolling.
Closes scroll snapback issue with Space, PageUp, PageDown keys.1 parent f402db8 commit 82a6a91
1 file changed
+12
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
308 | 311 | | |
309 | 312 | | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
310 | 322 | | |
311 | 323 | | |
312 | 324 | | |
| |||
0 commit comments