Fixed a bug where the contextual menu was being incorrectly positioned when zoom in on the webpage
This commit is contained in:
parent
0eb15085e9
commit
dca4702b7b
2 changed files with 7 additions and 4 deletions
|
@ -77,8 +77,9 @@ module.exports = React.createClass({
|
|||
onBadgeClicked: function(e) {
|
||||
var Menu = sdk.getComponent('rooms.NotificationStateContextMenu');
|
||||
var elementRect = e.target.getBoundingClientRect();
|
||||
var x = elementRect.right;
|
||||
var y = elementRect.top + (elementRect.height / 2);
|
||||
// The window X and Y offsets are to adjust position when zoomed in to page
|
||||
var x = elementRect.right + window.pageXOffset;
|
||||
var y = elementRect.top + (elementRect.height / 2) + window.pageYOffset;
|
||||
var self = this;
|
||||
ContextualMenu.createMenu(Menu, {
|
||||
left: x,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue