forked from public/foundryvtt-reve-de-dragon
Fix: Failed to execute 'getComputedStyle'
Dans certains cas (ouverture de fenêtre de lancer de sort), le bringToTop était appelé alors que la fenêtre n'était pas prête
This commit is contained in:
@ -171,23 +171,25 @@ export class RdDTMRDialog extends Dialog {
|
||||
async forceTMRDisplay() {
|
||||
if (this.rendered) {
|
||||
this.bringToTop()
|
||||
if (this.subdialog?.bringToTop) {
|
||||
this.subdialog.bringToTop();
|
||||
}
|
||||
this.bringSubDialogToTop();
|
||||
}
|
||||
}
|
||||
|
||||
bringSubDialogToTop() {
|
||||
if (this.subdialog?.bringToTop && this.subdialog?.element[0]) {
|
||||
this.subdialog.bringToTop();
|
||||
}
|
||||
}
|
||||
|
||||
async restoreTMRAfterAction() {
|
||||
this.subdialog = undefined
|
||||
await this.maximize();
|
||||
this.bringToTop();
|
||||
await this.maximize()
|
||||
this.bringToTop()
|
||||
}
|
||||
|
||||
forceTMRContinueAction() {
|
||||
ui.notifications.warn('Vous devez finir votre action avant de continuer dans les TMR');
|
||||
if (this.subdialog?.bringToTop) {
|
||||
this.subdialog.bringToTop();
|
||||
}
|
||||
this.bringSubDialogToTop();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -309,7 +311,7 @@ export class RdDTMRDialog extends Dialog {
|
||||
}
|
||||
const coord = this._getCoordActor();
|
||||
HtmlUtility.showControlWhen(this.html.find(".lire-signe-draconique"), this.actor.isResonanceSigneDraconique(coord));
|
||||
|
||||
|
||||
let ptsreve = document.getElementById("tmr-pointsreve-value");
|
||||
ptsreve.innerHTML = this.actor.system.reve.reve.value;
|
||||
|
||||
|
Reference in New Issue
Block a user