-
Notifications
You must be signed in to change notification settings - Fork 406
Links that open in a new tab fail when WordPress Playground runs inside an iframe #3450
Description
Prerequisites
- I have carried out troubleshooting steps and I believe I have found a bug.
- I have searched for similar bugs in both open and closed issues and cannot find a duplicate.
Describe the bug
When WordPress Playground runs inside an iframe, links that are supposed to open in a new tab do not work correctly.
A minimal example is:
<iframe src="https://playground.wordpress.net/"></iframe>
The same issue also occurs when Playground is started through the JavaScript API, since it still runs inside an iframe.
For example, when editing a page and clicking the View Page icon in the top toolbar, a new tab opens but the page does not load. In Chrome, it shows an ERR_FAILED browser error page.
When Playground is opened directly at https://playground.wordpress.net/ outside of an iframe, opening links in a new tab works as expected.
Related issue: #2130
Expected behavior
The link should open the correct destination in a new tab.
Actual behavior
A new tab opens, but the destination page fails to load. In Chrome, the tab shows an ERR_FAILED browser error page.
Steps to reproduce
- Embed WordPress Playground in an iframe:
<iframe src="https://playground.wordpress.net/"></iframe> - Open WordPress admin.
- Edit a page.
- Click the View Page icon in the top toolbar.
Isolating the problem
- I have deactivated other plugins and confirmed this bug occurs when only this plugin is active.
- This bug happens with a default WordPress theme active.
- I can reproduce this bug consistently using the steps above.