1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18: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:
calixteman 2025-01-30 16:51:26 +01:00 committed by GitHub
commit 58c8f069f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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