mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
fix scroll issue where focus is not well managed
remove console logs
This commit is contained in:
parent
b9802616b6
commit
1652ed42c5
1 changed files with 3 additions and 1 deletions
|
@ -91,7 +91,9 @@ var chat = (function()
|
||||||
{
|
{
|
||||||
if($('#chatbox').css("display") != "none"){
|
if($('#chatbox').css("display") != "none"){
|
||||||
if(!self.lastMessage || !self.lastMessage.position() || self.lastMessage.position().top < $('#chattext').height()) {
|
if(!self.lastMessage || !self.lastMessage.position() || self.lastMessage.position().top < $('#chattext').height()) {
|
||||||
$('#chattext').animate({scrollTop: $('#chattext')[0].scrollHeight}, "slow");
|
// if we use a slow animate here we can have a race condition when a users focus can not be moved away
|
||||||
|
// from the last message recieved.
|
||||||
|
$('#chattext').animate({scrollTop: $('#chattext')[0].scrollHeight}, "fast");
|
||||||
self.lastMessage = $('#chattext > p').eq(-1);
|
self.lastMessage = $('#chattext > p').eq(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue