I wanted to make a chat room in javascript and php and I found a Sugar Chat tutorial and modified it. However it has bugs.
When User 1 is scrolled down the bottom of the chat room, and User 2 posts a new message, the screen on User 1 does not scroll down to the bottom of the page. It is up to User 1 to keep scrolling down to see new chat room messages that other users post.
I tried to add code which keeps scrolling the user down in jquery every 300 milliseconds when the user is scrolled all the way at the bottom, but it prevents the user from scrolling up clicking the scroll up button. It forces the user to scroll down when they click scroll up.
Can anyone with experience or javascript or coding chat rooms help me on this?