Open Bug 1707497 Opened 3 years ago Updated 1 year ago

Explictely distinguish internal windows in modal dialog observer

Categories

(Remote Protocol :: Marionette, enhancement, P3)

Default
enhancement

Tracking

(Not tracked)

People

(Reporter: whimboo, Unassigned)

References

Details

Follow up from the Phabricator review of bug 1701686:

Maybe we should be explicit about the types handled in the else if?

And if subject.ownerGlobal != curBrowser.window is only relevant for one of the modal types, maybe have one else if for MODAL_TYPE_WINDOW and another one for MODAL_TYPE_INTERNAL_WINDOW

It's related to the following change:

            return;
          }
        } else if (
-           subject.ownerGlobal != curBrowser.window &&
-           subject.opener?.ownerGlobal != curBrowser.window
-         ) {
-           return;
+           modalType === Services.prompt.MODAL_TYPE_WINDOW ||
+           modalType === Services.prompt.MODAL_TYPE_INTERNAL_WINDOW
+         ) {
+           if (
+             subject != curBrowser.window &&
+             subject.opener != curBrowser.window
+           ) {
+             return;
+           }
        }

        this.callbacks.forEach(callback =>
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.