footer : remove immediate onScroll call on slide change refs #59
All checks were successful
Deploy / Deploy to Production (push) Successful in 22s
All checks were successful
Deploy / Deploy to Production (push) Successful in 22s
Calling onScroll() immediately after attaching the listener caused the footer to appear on page load when content height exceeded clientHeight by less than the threshold (0 >= smallOverflow - 100 = true at scrollTop=0). Footer now starts hidden and only reveals on explicit user scroll. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
719f6ced53
commit
edc3e3db1d
1 changed files with 3 additions and 1 deletions
|
|
@ -37,7 +37,9 @@
|
|||
}
|
||||
|
||||
scrollableContainer.addEventListener('scroll', onScroll)
|
||||
onScroll()
|
||||
// No immediate onScroll() call: footer starts hidden and only reveals when
|
||||
// the user actively scrolls near the bottom. Calling it immediately caused
|
||||
// the footer to flash on page load when content barely exceeded the threshold.
|
||||
|
||||
return () => {
|
||||
scrollableContainer.removeEventListener('scroll', onScroll)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue