How can I load a long list and stay/start on the bottom of the view without scrolling

We have a message view in our app where we on initial rendering load a list of messages which are then rendered, going from <div>Loading ....</div> to [<Message>,<Message>,...,<InputBox>] (pseudo-jsx). Upon loading, the view is extended to many times the screen length, so we need to scroll to the bottom onLoad(). This is bothersome :

  • lazy loading images in the older parts of the conversation won’t work, as we "scroll past" them, triggering loading
  • there should be no need to do scrollTo(99999): we want to start a freshly loaded page on the bottom!

So how can I have the initial "scroll position" of a container be the bottom of the container? This seems like a quite basic thing.

14 thoughts on “How can I load a long list and stay/start on the bottom of the view without scrolling”

Leave a Comment