From 018f3d2a5ce7c501b61b1c5a9348ba437938b487 Mon Sep 17 00:00:00 2001
From: Bruno Windels <brunow@matrix.org>
Date: Mon, 21 Jan 2019 17:30:02 +0100
Subject: [PATCH] use box-sizing: border-box to make clientHeight === actual
 height

---
 res/css/structures/_RoomView.scss        | 4 ++++
 src/components/structures/ScrollPanel.js | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/res/css/structures/_RoomView.scss b/res/css/structures/_RoomView.scss
index d8926c68e4..02d5cc67b0 100644
--- a/res/css/structures/_RoomView.scss
+++ b/res/css/structures/_RoomView.scss
@@ -171,6 +171,10 @@ limitations under the License.
 .mx_RoomView_MessageList {
     list-style-type: none;
     padding: 18px;
+    margin: 0;
+    /* needed as min-height is set to clientHeight in ScrollPanel
+    to prevent shrinking when WhoIsTypingTile is hidden */
+    box-sizing: border-box;
 }
 
 .mx_RoomView_MessageList li {
diff --git a/src/components/structures/ScrollPanel.js b/src/components/structures/ScrollPanel.js
index 91a9f1ddfa..96318d64e1 100644
--- a/src/components/structures/ScrollPanel.js
+++ b/src/components/structures/ScrollPanel.js
@@ -689,7 +689,7 @@ module.exports = React.createClass({
     blockShrinking: function() {
         const messageList = this.refs.itemlist;
         if (messageList) {
-            const currentHeight = messageList.clientHeight - 18;
+            const currentHeight = messageList.clientHeight;
             messageList.style.minHeight = `${currentHeight}px`;
         }
     },