Skip to content

Commit

Permalink
Avoid to remove the active overlay when a cancelled dialog (like the …
Browse files Browse the repository at this point in the history
…file picker) was called from a dialog
  • Loading branch information
calixteman committed Jan 30, 2025
1 parent 42c2b7b commit eca1e6c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions web/overlay_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ class OverlayManager {
}
this.#overlays.set(dialog, { canForceClose });

dialog.addEventListener("cancel", evt => {
this.#active = null;
dialog.addEventListener("cancel", ({ target }) => {
if (this.#active === target) {
this.#active = null;
}
});
}

Expand Down

0 comments on commit eca1e6c

Please sign in to comment.