mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
chat: fix coloring with dark background, and scrolling chattext when new message come in
This commit is contained in:
parent
780eaad573
commit
3e12b6d132
2 changed files with 2 additions and 1 deletions
|
@ -89,7 +89,7 @@ var chat = (function()
|
|||
scrollDown: function()
|
||||
{
|
||||
if($('.chat-content').is(':visible')){
|
||||
if(!self.lastMessage || !self.lastMessage.position() || self.lastMessage.position().top < $('#chattext').height()) {
|
||||
if(!self.lastMessage || !self.lastMessage.position() || self.lastMessage.position().top < ($('#chattext').outerHeight() + 20)) {
|
||||
// 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}, { duration: 400, queue: false });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue