fx-compat: Fix positioning of some context menus

This commit is contained in:
Dan Stillman 2022-05-12 05:15:56 -04:00
parent bc68b6e9fe
commit 7c458b9bd3
2 changed files with 10 additions and 2 deletions

View file

@ -508,7 +508,11 @@ Zotero.TagSelector = class TagSelectorContainer extends React.PureComponent {
tagContextMenu.childNodes[i].disabled = this.state.viewOnly;
}
ev.preventDefault();
tagContextMenu.openPopup(null, null, ev.clientX+2, ev.clientY+2);
tagContextMenu.openPopupAtScreen(
window.screenX + ev.clientX + 2,
window.screenY + ev.clientY + 2,
true
);
this.contextTag = tag;
}

View file

@ -3744,7 +3744,11 @@ var ItemTree = class ItemTree extends LibraryTree {
menupopup.appendChild(menuitem);
document.children[0].appendChild(menupopup);
menupopup.openPopup(null, null, event.clientX + 2, event.clientY + 2);
menupopup.openPopupAtScreen(
window.screenX + event.clientX + 2,
window.screenY + event.clientY + 2,
true
);
}
_getSecondarySortField() {