aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/settings
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-11 21:27:42 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-11 21:27:42 -0500
commit99867ebdd8ddc168abc3cc796a0c6a23701b2235 (patch)
treefa4110c559e1a184e1b8769e4e30e22f22b23ba9 /ext/bg/js/settings
parent7446c99f984ea84831b9e7f0a11b9a60581be563 (diff)
Fix text source issue
Diffstat (limited to 'ext/bg/js/settings')
-rw-r--r--ext/bg/js/settings/popup-preview-frame.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/bg/js/settings/popup-preview-frame.js b/ext/bg/js/settings/popup-preview-frame.js
index 73326322..dc85f493 100644
--- a/ext/bg/js/settings/popup-preview-frame.js
+++ b/ext/bg/js/settings/popup-preview-frame.js
@@ -24,6 +24,7 @@ class SettingsPopupPreview {
this.popupInjectOuterStylesheetOld = Popup.injectOuterStylesheet;
this.popupShown = false;
this.themeChangeTimeout = null;
+ this.textSource = null;
}
static create() {
@@ -95,7 +96,7 @@ class SettingsPopupPreview {
onWindowResize() {
if (this.frontend === null) { return; }
- const textSource = this.frontend.textSourceLast;
+ const textSource = this.textSource;
if (textSource === null) { return; }
const elementRect = textSource.getRect();
@@ -164,6 +165,7 @@ class SettingsPopupPreview {
} finally {
source.cleanup();
}
+ this.textSource = source;
await this.frontend.lastShowPromise;
if (this.frontend.popup.isVisible()) {