You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the result is only 1 row, total page height is very short.
After pressing the "Run HTML_CodeSnipper" button, the auto scroll functionality reaches the footer and starts to constantly move the page up and down by a pixel or two, but permanently.
The way around it is to refresh the page, after pressing the "Run HTML_CodeSnipper" button, forcefully keep scrolling up and stop the auto scroll from reaching bottom of the page until it times out (probably 1-2 seconds in total).
Please disable the auto scroll, especially for people like me that want no animation. (hint: prefers-reduced-motion)
The text was updated successfully, but these errors were encountered:
It seems that the problem might be related to the improper clearing of the interval, and this issue appears, for example, in the Chrome browser. It would be beneficial to add extra conditions to check if the scrolling has reached its target or surpassed the boundaries. Here is the improved version of the code:
Alternatively, you can also simplify the code using the smoothscroll-polyfill along with the scrollIntoView() function to achieve a smoother scrolling experience.
Include the script in the <head> section of your HTML file:
I have tested this code:
<a href="https://a.link" title="test" aria-label="something">A link</a>
Since the result is only 1 row, total page height is very short.
After pressing the "Run HTML_CodeSnipper" button, the auto scroll functionality reaches the footer and starts to constantly move the page up and down by a pixel or two, but permanently.
The way around it is to refresh the page, after pressing the "Run HTML_CodeSnipper" button, forcefully keep scrolling up and stop the auto scroll from reaching bottom of the page until it times out (probably 1-2 seconds in total).
Please disable the auto scroll, especially for people like me that want no animation. (hint: prefers-reduced-motion)
The text was updated successfully, but these errors were encountered: