fx-compat: Show native field/creator transform popups
No longer anchored to the element, but instead to the cursor.
This commit is contained in:
parent
c31df4ae6b
commit
0e1a16b96b
1 changed files with 13 additions and 4 deletions
|
@ -908,9 +908,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.editable && fieldMode == 0) {
|
if (this.editable && fieldMode == 0) {
|
||||||
firstlast.oncontextmenu = () => {
|
firstlast.oncontextmenu = (event) => {
|
||||||
document.popupNode = firstlast;
|
document.popupNode = firstlast;
|
||||||
this._id('zotero-creator-transform-menu').openPopup(firstlast);
|
this._id('zotero-creator-transform-menu').openPopupAtScreen(
|
||||||
|
event.screenX + 1,
|
||||||
|
event.screenY + 1,
|
||||||
|
true
|
||||||
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1404,9 +1408,14 @@
|
||||||
if (this.editable && (fieldName == 'seriesTitle' || fieldName == 'shortTitle' ||
|
if (this.editable && (fieldName == 'seriesTitle' || fieldName == 'shortTitle' ||
|
||||||
Zotero.ItemFields.isFieldOfBase(fieldID, 'title') ||
|
Zotero.ItemFields.isFieldOfBase(fieldID, 'title') ||
|
||||||
Zotero.ItemFields.isFieldOfBase(fieldID, 'publicationTitle'))) {
|
Zotero.ItemFields.isFieldOfBase(fieldID, 'publicationTitle'))) {
|
||||||
valueElement.oncontextmenu = () => {
|
valueElement.setAttribute('context', 'zotero-field-transform-menu');
|
||||||
|
valueElement.oncontextmenu = (event) => {
|
||||||
document.popupNode = valueElement;
|
document.popupNode = valueElement;
|
||||||
this._id('zotero-field-transform-menu').openPopup(valueElement);
|
this._id('zotero-field-transform-menu').openPopupAtScreen(
|
||||||
|
event.screenX + 1,
|
||||||
|
event.screenY + 1,
|
||||||
|
true
|
||||||
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue