From 8d7cb3700333d7b9a653445198b6c7564de5507f Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Mon, 13 Apr 2020 11:37:26 +0200 Subject: [PATCH] Fix scrolling --- assets/css/pages/conversations/conversation.css | 5 +---- assets/js/pages/conversations/conversation.js | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/assets/css/pages/conversations/conversation.css b/assets/css/pages/conversations/conversation.css index 5ef78588..ca57bd5b 100644 --- a/assets/css/pages/conversations/conversation.css +++ b/assets/css/pages/conversations/conversation.css @@ -18,14 +18,11 @@ flex-direction: column; } -.big-box-conversation .box-body .slimScrollDiv { - flex: 1; -} - .big-box-conversation .direct-chat-messages { flex: 1 1 auto; height: 0px; overflow: auto; + scroll-behavior: smooth; } .big-box-conversation .direct-chat-info span { diff --git a/assets/js/pages/conversations/conversation.js b/assets/js/pages/conversations/conversation.js index 7cb85d3d..e3e18e77 100644 --- a/assets/js/pages/conversations/conversation.js +++ b/assets/js/pages/conversations/conversation.js @@ -330,7 +330,7 @@ const ConversationPageConvPart = { //Set a timeout to make scroll properly work (for newest messages) if(toLatestMessages){ setTimeout(function(){ - messageContainer.scrollIntoView(false) + messageContainer.parentNode.scrollTop = messageContainer.parentNode.scrollHeight }, 100); } },