chat: fix coloring with dark background, and scrolling chattext when new message come in

This commit is contained in:
Sebastian Castro 2020-04-17 09:57:50 +02:00 committed by muxator
parent 780eaad573
commit 3e12b6d132
2 changed files with 2 additions and 1 deletions

View file

@ -89,7 +89,7 @@ var chat = (function()
scrollDown: function() scrollDown: function()
{ {
if($('.chat-content').is(':visible')){ 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 // 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. // from the last message recieved.
$('#chattext').animate({scrollTop: $('#chattext')[0].scrollHeight}, { duration: 400, queue: false }); $('#chattext').animate({scrollTop: $('#chattext')[0].scrollHeight}, { duration: 400, queue: false });

View file

@ -1,5 +1,6 @@
#chatbox { #chatbox {
background-color: transparent !important; background-color: transparent !important;
color: var(--text-color);
} }
.chat-content { .chat-content {
background: none; background: none;