When iOS Phonegap webpage links are embedded in an iframe, they open in the system browser instead of staying within

When using an iframe to embed a webpage in phonegap, on iOS the links will open in the system browser instead of within the iframe. This issue is only present in the compiled version on iOS, while Android and the phonegap app for iOS display the links correctly inside the iframe.

The preferences in Config.xml such as 'stay-in-webview' and 'Cordova.plist' seem to no longer be functional. Additionally, the 'ChildBrowser' preference is specific to Blackberry devices. Finally, the 'inAppBrowser' plugin experiences the same problem, where it loads the webpage internally but triggers Safari to open when clicking on any links.

To recreate this issue, simply create a new phonegap application, embed an iframe, and build for iOS or export with xcode.

We would greatly appreciate any assistance in resolving this matter!

Answer №1

Resolution: In the most recent version of phonegap (6.0 currently), enabling the following tags for compiled iOS can lead to this issue. It is possible that allowing these intents unintentionally instructs iOS to open all embedded links in Safari.

I decided to eliminate the tags below and now everything loads correctly within the iframe.


<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Issue: A request is not pending for flushing during the testing of an AngularJs service

As a beginner in AngularJs, I am currently working on my first unit test. In order to test the service I created, I wrote a test that simply returns a single Json object. However, whenever I run the test, I encounter the error mentioned in the title. I am ...

What is the best way to combine data from two rows into one row?

Can someone help me with merging 2 sets of Line data into a single row for each entry? For example, the 'Green Bay Packers @ Chicago Bears' row should display '+3.5000 and -3.5000', while 'Atlanta @ Minnesota' should show &apo ...

A guide on multiplying a number with the index of an array in Node.js with the hbs engine

{{#each myData}} <div class="product-default-single-item product-color--golden" data-aos="fade-up" data-aos-delay="{{@index * 200}}"> </div> {{/each}} Here is some code that I am working on. I want to apply a dyna ...

Error: Instance of UICollectionView received an unknown message

I encountered this issue: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UICollectionViewCell label]: unrecognized selector sent to instance 0x1eead660'. My approach involves using a nib file for ...

Is it necessary to use the "new" keyword when utilizing JS closure to create objects?

My response to a question about closures on SO included the following code sample: function Constructor() { var privateProperty = 'private'; var privateMethod = function(){ alert('called from public method'); }; ...

What is the best way to compute the total sum of values associated with a specific key in an

Imagine I have an array with multiple objects like so: var arr = [{ 'credit': 1, 'trash': null }, { 'credit': 2, 'trash': null}] My goal is to calculate the sum of all credit values from the arr. The expected sum v ...

Testing Vue watcher that observes a computed property in VueX: Tips and Tricks

Consider the code snippet below: import { mapState } from 'vuex'; import externalDependency from '...'; export default { name: 'Foo', computed: { ...mapState(['bar']) }, watch: { bar () { exter ...

Getting Checkbox values selected by the user with ng-model in AngularJS

Having some trouble implementing Checkbox functionality, I'm having difficulty determining which checkboxes the user has selected. How can this be achieved? Here's a look at my HTML snippet: <td> <table border="0">< ...

The IF ELSE statement consistently directs the program flow to the ELSE block

This is the code for my POST request: router.post('/', (req, res) => { let body = { ...req.body }; let oddArray = new Array(); let evenArray = new Array(); let isSuccess = true; body.array.forEach((element) => { ...

Display various elements depending on the size of the screen within Next.js

My goal is to display a component differently depending on whether the screen width is less than 768p or not. If the width is under 768p, I want to show the hamburger menu. Otherwise, I want to display the full menu. This is the code snippet I am using. ...

The presence of asynchronous JavaScript can lead to errors due to missing functions in JavaScript

I've encountered an issue with a jQuery script that I modified by adding an ASYNC attribute. Surprisingly, it functions correctly in Firefox but encounters intermittent failures in both Chrome and IE browsers. Here's the PHP code snippet respons ...

The value chosen by the user is not retained by the Select function

Having some trouble with a simple select issue in Angular that is causing my select options to disappear after clicking on them. Here's my code: var app = angular.module("myApp", []); app.controller("myCtrl", function($scope) { $scope.searchFilt ...

Exploring methods to target the window.location.pathname in Next.js

Is there a way to specify the window.location.pathname in NEXT.JS? I am encountering an error message in my code when using this snippet with next.js const isAdminPath = window.location.pathname.startsWith("/adminpath"); ...

Generate HTML table with CSS dynamically applied through jQuery

After performing some calculations and applying CSS rules using the .css() function in jQuery to color the background of a table, I am facing an issue when trying to print the page. The printed page appears in black and white without retaining any styling ...

Manage both React keyboard and mouse events within a single function

I'm working on enhancing the accessibility of my web app by making it keyboard accessible. However, I am facing an issue when trying to handle both click and keyboard events using the '|' symbol in my function: Property 'key' does ...

Using Material-UI with @emotion/cache in SSR results in consistently empty cache

After transitioning my React SSR from pure @emotion to material-ui 5.0, I encountered an issue where the styles no longer get extracted. The ID extraction in createExtractCriticalToChunks seems to be functioning correctly, but the cache.inserted object fro ...

Error encountered with $http.get during ng-click execution

edit: to make it clear, I have excluded some input fields and additional code, but all necessary information is included. I have searched extensively online without finding a solution. In my html, I am executing a function userSearch() on ng-click. The ng ...

The physical back button or slide feature does not navigate back to the previous page

Today I encountered a peculiar issue with my Flutter application. After adding the Firebase messaging and Flutter local notifications packages, and configuring them for iOS and Android, I noticed that the back button on the emulator and physical device as ...

Adapting npm scripts with Node.js based on the current context

Can you set up package.json to execute a different npm start script depending on the context? For instance, I want to run DEBUG=http nodemon app.js during development. However, I prefer to run node app.js in production. ...

Node.js Express application: Managing endpoint conflicts

After searching for a solution to this issue and not finding one, I apologize if this question is repetitive. In my express+node.js application, I have two endpoints defined as follows: // Retrieves a tweet by unique id app.get('/tweets:id', fu ...