Closed wesleytodd closed 7 years ago
Was just thinking about this too. Not extremely familiar with this, but it looks like a slightly different api:
window
// scroll to top left of page
window.scroll(0, 0)
element
// set element scroll position to top left:
ele.scrollLeft = 0;
ele.scrollTop = 0;
we could definitely handle the element case and default to window if element is undefined
hmm, yeah seems like more work than I thought. I still think that the exposed api could be like I said above, but the implementation itself might have to change. I was originally thinking it would just be:
options.element = options.element || window;
// ...
options.element.scroll();
Yeah that's what I was hoping too. Anyway, I can do this after I finish up some other work this week if you think we'll use element scrolling soon
No rush, but it would be nice to use this in the chat's "scroll to bottom" button
Closed in #7
Something like this: