Skip to content

Commit

Permalink
Move up z-index setter in window rendering
Browse files Browse the repository at this point in the history
This makes it so if a window throws an error on render
it won't mess up any next attempts to increase the zindex.
  • Loading branch information
andersevenrud committed Aug 16, 2020
1 parent 5e91b55 commit 22b981d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 22b981d

Please sign in to comment.