Prevent chat from autoscrolling when mouse inside
This commit is contained in:
parent
31fd011b4d
commit
7b11651e1e
2 changed files with 9 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue