fix(#1297): prevent scroll jump on loadMore prepend
Two cooperating fixes: 1. overflow-anchor: none on .live — disables browser scroll anchoring so the manual scrollTop compensation in loadMore() is the sole mechanism. Without this the browser auto-adjusts scrollTop when rows are prepended above the viewport, then our += delta doubles the compensation, causing the erratic jump. 2. updateLoadMoreBtn() moved before the beforeH baseline capture — if histHasMore becomes false the load-more button is removed here rather than after the delta is applied, so the button height is already baked into beforeH and doesn't shift the viewport post- compensation.
This commit is contained in:
parent
ab65245619
commit
0f77fc3598
2 changed files with 13 additions and 1 deletions
|
|
@ -36,6 +36,11 @@
|
|||
overflow-y: auto;
|
||||
max-height: 32em;
|
||||
font-family: inherit;
|
||||
/* Disable browser scroll anchoring — the terminal manages scroll
|
||||
position manually (snapToBottom + loadMore compensation). Scroll
|
||||
anchoring would double-compensate scrollTop during loadMore()
|
||||
prepends, causing an erratic jump. */
|
||||
overflow-anchor: none;
|
||||
}
|
||||
.live.terminal {
|
||||
background: transparent;
|
||||
|
|
|
|||
Loading…
Reference in a new issue