Answer the question
In order to leave comments, you need to log in
How to scroll messages like in most messengers?
How can I implement message scrolling in such a way that the last message is always visible and the user does not have to scroll down to see it, but if the user decides to read old messages by scrolling up, then his chat would not jump to the new message if did it come?
With the first one, I somehow almost coped by writing the following function:
const positioningScrollbar = (ref) => {
if (ref.current) {
ref.current.scrollTop = ref.current.scrollHeight
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question