Cannot wrap window.open in a promise

Issue #14150687 • Assigned to Travis L.

Details

Author
Ashley G.
Created
Oct 9, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
16.16288
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

Wrapping window.open in a promise causes the promise to reject with a “Permission denied” error. Repro URL: https://www.scirra.com/labs/bugs/edgepopup.html

  1. Click "Open popup normally". Approve any permission prompt to always allow popups. Notice window opens normally with no errors. (Try again after approving permission to check.)
  2. Click "Open popup via Promise". This simply wraps window.open in a Promise. The promise rejects with "Permission denied". It works correctly in Chrome and Firefox.

This is important for our PWA Construct 3 at https://editor.construct.net. When the user clicks "Run", we run the game in a popup window. This issue causes the game to fail to load. We are only able to show the game in an iframe in Edge.

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “James M.”

      Changed Assigned To to “travil”

      Changed Assigned To from “travil” to “Travis L.”

    • It turns out we can work around this by resolving with an object (e.g. {window: win}) rather than the window directly. Perhaps checking for the “then” method is what is breaking this.

    • Microsoft Edge Team

      Changed Title from “Cannot wrap window.open in a promise” to “Cannot wrap window.open in a promise”

    You need to sign in to your Microsoft account to add a comment.

    Sign in