aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/popup-factory.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fg/js/popup-factory.js')
-rw-r--r--ext/fg/js/popup-factory.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/ext/fg/js/popup-factory.js b/ext/fg/js/popup-factory.js
index c48db51a..1dc7d61e 100644
--- a/ext/fg/js/popup-factory.js
+++ b/ext/fg/js/popup-factory.js
@@ -124,11 +124,16 @@ class PopupFactory {
return await popup.containsPoint(x, y);
}
- async _onApiShowContent({id, elementRect, writingMode, type, details, context}) {
+ async _onApiShowContent({id, details, displayDetails}) {
const popup = this._getPopup(id);
- elementRect = this._convertJsonRectToDOMRect(popup, elementRect);
if (!this._popupCanShow(popup)) { return; }
- return await popup.showContent(elementRect, writingMode, type, details, context);
+
+ const {elementRect} = details;
+ if (typeof elementRect !== 'undefined') {
+ details.elementRect = this._convertJsonRectToDOMRect(popup, elementRect);
+ }
+
+ return await popup.showContent(details, displayDetails);
}
_onApiSetCustomCss({id, css}) {