Fix text source issue
This commit is contained in:
parent
7446c99f98
commit
99867ebdd8
@ -24,6 +24,7 @@ class SettingsPopupPreview {
|
|||||||
this.popupInjectOuterStylesheetOld = Popup.injectOuterStylesheet;
|
this.popupInjectOuterStylesheetOld = Popup.injectOuterStylesheet;
|
||||||
this.popupShown = false;
|
this.popupShown = false;
|
||||||
this.themeChangeTimeout = null;
|
this.themeChangeTimeout = null;
|
||||||
|
this.textSource = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static create() {
|
static create() {
|
||||||
@ -95,7 +96,7 @@ class SettingsPopupPreview {
|
|||||||
|
|
||||||
onWindowResize() {
|
onWindowResize() {
|
||||||
if (this.frontend === null) { return; }
|
if (this.frontend === null) { return; }
|
||||||
const textSource = this.frontend.textSourceLast;
|
const textSource = this.textSource;
|
||||||
if (textSource === null) { return; }
|
if (textSource === null) { return; }
|
||||||
|
|
||||||
const elementRect = textSource.getRect();
|
const elementRect = textSource.getRect();
|
||||||
@ -164,6 +165,7 @@ class SettingsPopupPreview {
|
|||||||
} finally {
|
} finally {
|
||||||
source.cleanup();
|
source.cleanup();
|
||||||
}
|
}
|
||||||
|
this.textSource = source;
|
||||||
await this.frontend.lastShowPromise;
|
await this.frontend.lastShowPromise;
|
||||||
|
|
||||||
if (this.frontend.popup.isVisible()) {
|
if (this.frontend.popup.isVisible()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user