Clear and concise description of the problem
When I try to use CSS’s overflow: hidden and control the scroll position through JavaScript’s scrollTop or scrollLeft, the scrolling behavior works as expected. However, the elements in the window do not update. The window still displays the previous DOM elements (i.e., the elements at the new position are not rendered correctly).
Note: When overflow: auto or overflow: scroll is used, everything works as expected. But this does not meet my requirement of setting the scroll position only through scrollTop or scrollLeft in the code.
Suggested solution
I’m not familiar with the implementation of this project, but if possible, I hope that when overflow: hidden is used, manually setting scrollTop or scrollLeft can also normally update the elements in the window.
Alternative
No response
Additional context
No response
Validations
Clear and concise description of the problem
When I try to use CSS’s
overflow: hiddenand control the scroll position through JavaScript’sscrollToporscrollLeft, the scrolling behavior works as expected. However, the elements in the window do not update. The window still displays the previous DOM elements (i.e., the elements at the new position are not rendered correctly).Note: When
overflow: autooroverflow: scrollis used, everything works as expected. But this does not meet my requirement of setting the scroll position only throughscrollToporscrollLeftin the code.Suggested solution
I’m not familiar with the implementation of this project, but if possible, I hope that when
overflow: hiddenis used, manually settingscrollToporscrollLeftcan also normally update the elements in the window.Alternative
No response
Additional context
No response
Validations