Merge pull request #865 from marcelklehr/fix/chat-autoscroll

Don't scroll chat automatically if user is not at the bottom
This commit is contained in:
Matthias Bartelmeß 2012-07-12 03:26:12 -07:00
commit 8882bbff6a
2 changed files with 3 additions and 6 deletions

View File

@ -62,9 +62,10 @@ var chat = (function()
},
scrollDown: function()
{
if($('#options-scrollchat').is(':checked')){
if($('#chatbox').css("display") != "none"){
if($('#chatbox').css("display") != "none"){
if(!self.lastMessage || !self.lastMessage.position() || self.lastMessage.position().top < $('#chattext').height()) {
$('#chattext').animate({scrollTop: $('#chattext')[0].scrollHeight}, "slow");
self.lastMessage = $('#chattext > p').eq(-1);
}
}
},

View File

@ -168,10 +168,6 @@
<input type="checkbox" id="options-linenoscheck" checked>
<label for="options-linenoscheck">Line numbers</label>
</p>
<p>
<input type="checkbox" id="options-scrollchat" checked>
<label for="options-scrollchat">Automatically Scroll Chat</label>
</p>
<p>
Font type:
<select id="viewfontmenu">