Why are links inside an iFrame opening in system safari?
<p>Between builds (I am unsure what changed to trigger this), an application went from the following behavior in iOS.</p>

<ul>
<li>A main webview loads <code>index.html</code>, and has an iframe that has many anchors in it</li>
<li>Anchors would stay inside the iFrame unless otherwise manipulated and redirected with JavaScript that runs from <code>index.html</code></li>
</ul>

<p>To:</p>

<ul>
<li>A main webview loads <code>index.html</code>, and has an iframe that has many anchors in it</li>
<li>Clicking any anchor inside of the iFrame <em>or</em> any action that triggers a location change results in the new page being loaded in the Safari App rather than inside the iFrame</li>
</ul>

<p>I have the latest version of <code>cordova-plugin-inappbrowser</code> (1.3.0 at this time) installed, but that does not seem to be interfering with anything.</p>

<p>I have verified that I am still able to use JavaScript from <code>index.html</code> to change attributes about anchors inside the frame, as well as to add events.</p>

<p>I am using the following CSP:</p>

<p><code>&lt;meta http-equiv="Content-Security-Policy"
        content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval';"&gt;</code></p>

<p>I am unsure if that has something to do with it.</p>

<p>I've tried a number of iframe sandbox properties in an attempt to see what sticks, and none of them change outcome. Currently it's at:</p>

<p><code>&lt;iframe id="the-iframe" sandbox="allow-scripts allow-modals allow-popups allow-popups-to-escape-sandbox allow-top-navigation allow-forms allow-same-origin"&gt;&lt;/iframe&gt;</code></p>

<p>The <code>src</code> of the iframe is set dynamically.</p>

<p>I have opened up a <a href="https://issues.apache.org/jira/browse/CB-11087" rel="noreferrer">bug report</a> on cordova to see if this is potentially a bug rather than a feature.</p>