The front end imitates the problems encountered in Wechat's chat.

two people are chatting. After the message of
An is sent, it will be displayed in the chat box of AMagi B.
I use the scrollTo () method to keep the scroll axes of both dialogs at the bottom after the message is sent.
but what if B is flipping through the chat record when A sends the message, and you don"t want the scroll axis of the B chat box to scroll to the bottom automatically?

May.28,2021
When the

scroll bar stops, record whether the current position is at the bottom, and then automatically scroll according to this state


B chat box scroll axis before automatically scrolling to the bottom, add a judgment to determine whether there is an upturn operation

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3c56e-2c2fa.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3c56e-2c2fa.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?