mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 14:48:08 +02:00
Merge pull request #19395 from calixteman/fix_overlay_manager
Avoid to remove the active overlay when a cancelled dialog (like the file picker) was called from a dialog
This commit is contained in:
commit
58c8f069f7
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