Potentially fix Linux popup positioning issue

This commit is contained in:
Abe Jellinek 2024-01-13 02:36:47 -05:00 committed by Dan Stillman
parent f039124312
commit ee5106939c
2 changed files with 7 additions and 7 deletions

View file

@ -719,7 +719,7 @@ class VirtualizedTable extends React.Component {
if (!modifierClick && !this.selection.isSelected(index)) {
this._onSelection(index, false, false);
}
this.props.onItemContextMenu(e, window.screenX + e.clientX, window.screenY + e.clientY);
this.props.onItemContextMenu(e, e.screenX, e.screenY);
}
// All modifier clicks handled in mouseUp per mozilla itemtree convention
if (!modifierClick && !this.selection.isSelected(index)) {

View file

@ -3095,8 +3095,8 @@ var ZoteroPane = new function()
}
function openPopup(popup, clientX, clientY) {
popup.openPopupAtScreen(clientX + 1, clientY + 1, true);
function openPopup(popup, screenX, screenY) {
popup.openPopupAtScreen(screenX + 1, screenY + 1, true);
}
@ -3105,8 +3105,8 @@ var ZoteroPane = new function()
*/
this.onCollectionsContextMenuOpen = async function (event, x, y) {
await ZoteroPane.buildCollectionContextMenu();
x = x || event.clientX;
y = y || event.clientY;
x = x || event.screenX;
y = y || event.screenY;
// TEMP: Quick fix for https://forums.zotero.org/discussion/105103/
if (Zotero.isWin) {
x += 10;
@ -3120,8 +3120,8 @@ var ZoteroPane = new function()
*/
this.onItemsContextMenuOpen = async function (event, x, y) {
await ZoteroPane.buildItemContextMenu();
x = x || event.clientX;
y = y || event.clientY;
x = x || event.screenX;
y = y || event.screenY;
// TEMP: Quick fix for https://forums.zotero.org/discussion/105103/
if (Zotero.isWin) {
x += 10;