Reputation: 1907
The docs say .scrollIntoView(true):
true - the top of the element will be aligned to the top of the visible area of the scrollable ancestor
[...]
Note: Depending on the layout of other elements, some elements may not be scrolled completely to the top or to the bottom.
ok, well how to I get it to scroll to the top, actually? I want my element to be the first visible thing, in the viewport.
Upvotes: 1
Views: 348