From 22b981dea65f1e89c4c64aec182dedc5f7b0a51a Mon Sep 17 00:00:00 2001 From: Anders Evenrud Date: Sun, 16 Aug 2020 15:40:06 +0200 Subject: [PATCH] Move up z-index setter in window rendering This makes it so if a window throws an error on render it won't mess up any next attempts to increase the zindex. --- src/window.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/window.js b/src/window.js index 0739ca53..a8533ffb 100644 --- a/src/window.js +++ b/src/window.js @@ -492,12 +492,13 @@ export default class Window extends EventEmitter { this.clampToViewport(false); } + this.setNextZindex(true); + this.core.$contents.appendChild(this.$element); renderCallback(this, callback); this.rendered = true; - this.setNextZindex(true); setTimeout(() => { this.emit('render', this);