1
0
Fork 0
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:
Calixte Denizet 2025-01-30 16:13:48 +01:00
parent 42c2b7b657
commit eca1e6c52e

View file

@ -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;
}
});
}