From a44ef5bd48c9803d43a961dd538cfa712a0cdb2b Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Fri, 19 Feb 2016 02:21:17 +0000 Subject: [PATCH] fix incomingCallBox vertical offset if MatrixToolbar is present --- src/components/views/rooms/RoomList.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/views/rooms/RoomList.js b/src/components/views/rooms/RoomList.js index 5c729c6047..07ed450ef2 100644 --- a/src/components/views/rooms/RoomList.js +++ b/src/components/views/rooms/RoomList.js @@ -291,6 +291,13 @@ module.exports = React.createClass({ } } + // slightly ugly hack to offset if there's a toolbar present. + // we really should be calculating our absolute offsets of top by recursing through the DOM + toolbar = document.getElementsByClassName("mx_MatrixToolbar")[0]; + if (toolbar) { + top += toolbar.offsetHeight; + } + incomingCallBox.style.top = top + "px"; incomingCallBox.style.left = scroll.offsetLeft + scroll.offsetWidth + "px"; }