I am currently working on a Chat UI that needs to function consistently across various browsers. The main issue I am facing is the inability to keep the chat-body
div scrolled to the bottom when the page loads or when new messages are added.
Even after checking the scrollTop
property of the chat-body
div using JavaScript, it constantly returns a value of 0
, regardless of the actual scroll position. This rules out using JavaScript as a solution, which was my preferred approach anyways.
What would be the best way to ensure that this div remains scrolled to the bottom at all times?