Blocked opening in a new window: the frame is sandboxed without allow-popups

The page in your frame tries to open a new window or tab. Your sandbox attribute does not have allow-popups, so the browser blocks it.

  • Chrome
  • Edge
  • Firefox
  • Safari

Updated

Console error · Chrome, Edge and Safari, exact text

Blocked opening 'https://example.com/help' in a new window because the request was made in a sandboxed frame whose 'allow-popups' permission is not set.

Chrome, Edge, SafariExact text

A link with target="_blank" or a window.open() call does nothing.

Blocked opening 'https://example.com/help' in a new window because the request was made in a sandboxed frame whose 'allow-popups' permission is not set.

FirefoxWhat you see

A link with target="_blank" or a window.open() call does nothing.

On this page

What it means

The page in the frame wants to open a new window or tab, and the sandbox of your iframe does not allow it. The click does nothing. This is a choice in your iframe tag.

Why it happens

A link or a script in the frame opens a new window:

<a href="https://example.com/help" target="_blank">Help</a>
  1. Links with target="_blank" and window.open() both need allow-popups.

  2. A sign-in page that opens a pop-up also needs it.

  3. A new window opened from a sandboxed frame gets the same sandbox, unless you add allow-popups-to-escape-sandbox.

Check the page

See the headers the page sends now

Fix it if you own the site

Add allow-popups to the sandbox attribute. Add allow-popups-to-escape-sandbox when the new window must work as a normal page. The sandbox guide lists each flag.

HTML
<iframe
  src="https://example.com/"
  sandbox="allow-scripts allow-popups allow-popups-to-escape-sandbox"
></iframe>

Do not add allow-scripts and allow-same-origin together to a frame from your own origin. The page in the frame can then remove its own sandbox.

If you do not own the site

The sandbox attribute is on your iframe tag, so you can change it. If the tag comes from another site, use one of these.

  1. Ask for the flag

    Ask the owner of the embed code to add allow-popups to the sandbox attribute.

  2. Open the page in a new tab

    Link to the page so it runs with no sandbox.

Sources

Know before you embed.

Free, no sign-up, nothing stored. Paste a URL and get a verdict, a live preview, and the fix.