fix incomingCallBox vertical offset if MatrixToolbar is present

pull/21833/head
Matthew Hodgson 2016-02-19 02:21:17 +00:00
parent 957ef9cdc8
commit a44ef5bd48
1 changed files with 7 additions and 0 deletions

View File

@ -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";
}