Prevent chat from autoscrolling when mouse inside

This commit is contained in:
calzoneman 2013-03-30 00:55:25 -05:00
parent 31fd011b4d
commit 7b11651e1e
2 changed files with 9 additions and 1 deletions

View file

@ -103,7 +103,8 @@ function initCallbacks() {
if($("#messagebuffer").children().length > 100) {
$($("#messagebufer").children()[0]).remove();
}
$("#messagebuffer").scrollTop($("#messagebuffer").prop("scrollHeight"));
if(SCROLLCHAT)
$("#messagebuffer").scrollTop($("#messagebuffer").prop("scrollHeight"));
});
socket.on("playlist", function(data) {
@ -298,6 +299,9 @@ function initCallbacks() {
socket.on("newPoll", function(data) {
addPoll(data);
if(SCROLLCHAT) {
$("#messagebuffer").scrollTop($("#messagebuffer").prop("scrollHeight"));
}
});
socket.on("updatePoll", function(data) {