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

pull/3886/head
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()
{
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 });

View File

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