aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-15 21:48:29 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-16 19:54:41 -0500
commit29734ea6e95ad0c3a7e159a424dd587dc4966fa5 (patch)
tree5137dc83fe36d54d5f29079b027bf3c92c40e4e3
parent72ab6f1f454994442bd7bedc9fb35077f7a26327 (diff)
isVisible => isVisibleSync
-rw-r--r--ext/bg/js/settings/popup-preview-frame.js2
-rw-r--r--ext/fg/js/popup-proxy-host.js2
-rw-r--r--ext/fg/js/popup.js10
3 files changed, 7 insertions, 7 deletions
diff --git a/ext/bg/js/settings/popup-preview-frame.js b/ext/bg/js/settings/popup-preview-frame.js
index b2902af0..f65b119c 100644
--- a/ext/bg/js/settings/popup-preview-frame.js
+++ b/ext/bg/js/settings/popup-preview-frame.js
@@ -166,7 +166,7 @@ class SettingsPopupPreview {
this.textSource = source;
await this.frontend.showContentCompleted();
- if (this.frontend.popup.isVisible()) {
+ if (this.frontend.popup.isVisibleSync()) {
this.popupShown = true;
}
diff --git a/ext/fg/js/popup-proxy-host.js b/ext/fg/js/popup-proxy-host.js
index cb385cc2..2f06bb67 100644
--- a/ext/fg/js/popup-proxy-host.js
+++ b/ext/fg/js/popup-proxy-host.js
@@ -140,7 +140,7 @@ class PopupProxyHost {
}
static _popupCanShow(popup) {
- return popup.parent === null || popup.parent.isVisible();
+ return popup.parent === null || popup.parent.isVisibleSync();
}
}
diff --git a/ext/fg/js/popup.js b/ext/fg/js/popup.js
index af380ff8..4b8da979 100644
--- a/ext/fg/js/popup.js
+++ b/ext/fg/js/popup.js
@@ -70,7 +70,7 @@ class Popup {
}
hide(changeFocus) {
- if (!this.isVisible()) {
+ if (!this.isVisibleSync()) {
return;
}
@@ -84,7 +84,7 @@ class Popup {
}
async isVisibleAsync() {
- return this.isVisible();
+ return this.isVisibleSync();
}
setVisibleOverride(visible) {
@@ -93,7 +93,7 @@ class Popup {
}
async containsPoint(x, y) {
- for (let popup = this; popup !== null && popup.isVisible(); popup = popup._child) {
+ for (let popup = this; popup !== null && popup.isVisibleSync(); popup = popup._child) {
const rect = popup._container.getBoundingClientRect();
if (x >= rect.left && y >= rect.top && x < rect.right && y < rect.bottom) {
return true;
@@ -135,7 +135,7 @@ class Popup {
parent._child = this;
}
- isVisible() {
+ isVisibleSync() {
return this._isInjected && (this._visibleOverride !== null ? this._visibleOverride : this._visible);
}
@@ -279,7 +279,7 @@ class Popup {
}
_updateVisibility() {
- this._container.style.setProperty('visibility', this.isVisible() ? 'visible' : 'hidden', 'important');
+ this._container.style.setProperty('visibility', this.isVisibleSync() ? 'visible' : 'hidden', 'important');
}
_focusParent() {