Bug 1722597 - prevent unwarranted error console spew "Prompter: internal dialogs not available in this context.". r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D123211
This commit is contained in:
Magnus Melin 2021-08-20 20:19:29 +00:00
parent 0631918631
commit 9f5d953c6b

View File

@ -1031,7 +1031,8 @@ class ModalPrompter {
if (
domWin &&
(!modalType || modalType == MODAL_TYPE_WINDOW) &&
!this.browsingContext?.isContent
!this.browsingContext?.isContent &&
this.browsingContext?.associatedWindow?.gDialogBox
) {
modalType = MODAL_TYPE_INTERNAL_WINDOW;
}