aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/fg/js/frame-offset-forwarder.js5
-rw-r--r--ext/fg/js/popup-proxy.js5
2 files changed, 7 insertions, 3 deletions
diff --git a/ext/fg/js/frame-offset-forwarder.js b/ext/fg/js/frame-offset-forwarder.js
index c32c2ec1..7b417b6e 100644
--- a/ext/fg/js/frame-offset-forwarder.js
+++ b/ext/fg/js/frame-offset-forwarder.js
@@ -80,7 +80,10 @@ class FrameOffsetForwarder {
sourceFrame = frame;
break;
}
- if (sourceFrame === null) { return; }
+ if (sourceFrame === null) {
+ this._forwardFrameOffsetOrigin(null, uniqueId);
+ return;
+ }
const [forwardedX, forwardedY] = offset;
const {x, y} = sourceFrame.getBoundingClientRect();
diff --git a/ext/fg/js/popup-proxy.js b/ext/fg/js/popup-proxy.js
index fd07ee46..67b0b2c6 100644
--- a/ext/fg/js/popup-proxy.js
+++ b/ext/fg/js/popup-proxy.js
@@ -138,7 +138,8 @@ class PopupProxy {
this._frameOffsetPromise = this._getFrameOffset();
if (firstRun) {
try {
- this._frameOffset = await this._frameOffsetPromise;
+ const offset = await this._frameOffsetPromise;
+ this._frameOffset = offset !== null ? offset : [0, 0];
this._frameOffsetUpdatedAt = Date.now();
} catch (e) {
console.error(e);
@@ -146,7 +147,7 @@ class PopupProxy {
this._frameOffsetPromise = null;
} else {
this._frameOffsetPromise.then((offset) => {
- this._frameOffset = offset;
+ this._frameOffset = offset !== null ? offset : [0, 0];
this._frameOffsetUpdatedAt = Date.now();
this._frameOffsetPromise = null;
}, (e) => {