We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7a94da commit fb10473Copy full SHA for fb10473
1 file changed
apps/sim/lib/core/utils/smooth-bottom-chase.ts
@@ -80,11 +80,12 @@ export function createSmoothBottomChase(
80
}
81
const top = target.getTop()
82
const bottomTop = target.getBottomTop()
83
- if (
84
- lastTop !== null &&
85
- lastBottomTop !== null &&
86
- lastTop - top > lastBottomTop - bottomTop + 1
87
- ) {
+ // A user scroll is an ACTUAL upward top move (first clause — growth alone
+ // must not trip this) that exceeds any upward move of the bottom itself
+ // (second clause — a shrink clamp moves both together).
+ const topDrop = lastTop === null ? 0 : lastTop - top
+ const bottomDrop = lastBottomTop === null ? 0 : lastBottomTop - bottomTop
88
+ if (topDrop > 1 && topDrop > bottomDrop + 1) {
89
park()
90
return
91
0 commit comments