From 7c458b9bd35ab90f45c8dbb2f4988ef589da0225 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 12 May 2022 05:15:56 -0400 Subject: [PATCH] fx-compat: Fix positioning of some context menus --- chrome/content/zotero/containers/tagSelectorContainer.jsx | 6 +++++- chrome/content/zotero/itemTree.jsx | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/containers/tagSelectorContainer.jsx b/chrome/content/zotero/containers/tagSelectorContainer.jsx index 0bdf1c63e7..57ca342c6d 100644 --- a/chrome/content/zotero/containers/tagSelectorContainer.jsx +++ b/chrome/content/zotero/containers/tagSelectorContainer.jsx @@ -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; } diff --git a/chrome/content/zotero/itemTree.jsx b/chrome/content/zotero/itemTree.jsx index 67ee178162..9fcafc109c 100644 --- a/chrome/content/zotero/itemTree.jsx +++ b/chrome/content/zotero/itemTree.jsx @@ -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() {