When loading an external website with different HTML files in an iframe within a Cordova webview on iOS, I encountered an issue. Whenever I click on a link within the iframe that points to another HTML page, it opens in the Safari browser instead of changing the location inside the iframe.
To work around this problem, I had to overwrite the click action using the following code:
$('a').click(function(event){
event.preventDefault();
window.location.replace($(this).attr('href'));
}
While this solution works, it's not ideal. I'm looking for a way to prevent Cordova from opening links in the external Safari app. Is there a configuration setting in the config.xml file that can help me achieve this?