When quickly navigating between pages (e.g., using "Next/Prev" buttons) with scroll-behavior: smooth enabled, a visual bug occurs. This results in either the wrong page being rendered (based on old scroll coordinates) or a portion of the previous page remaining visible.
Steps to Reproduce:
Enable smooth scroll on the container
Rapidly click "Next"/"Previous" navigation buttons without waiting for the scroll animation to complete.
Observe visual artifacts: misaligned content or fragments of the old page.
The issue seems to occur when a new scroll command is triggered before the previous smooth-scroll animation has finished.
