mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Avoid to remove the active overlay when a cancelled dialog (like the file picker) was called from a dialog
This commit is contained in:
parent
42c2b7b657
commit
eca1e6c52e
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue