- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey guys,
I have an app that, for some screens, opens an external url www.mysite.com/screenexample.html. I had it working properly on Cordova CLI 5.1.1. Now I updated to 6.2, and when I click on some buttons, the app opens the url in the external browser by default, it doesn't stay on my app. How to prevent that? I didn't change anything in the code, but now every link to the web is opening in the external system browser, not my app.
This is happening only on iOS. On Android it works fine.
How to prevent safari from opening when people click on a link in my app?
Thanks!
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Fred -- I recommend you do not use a window.open() or href (or eqivalent), use the inAppBrowser plugin. Check the API in the git repo for that plugin for more details. It will give you the control you want over how links are opened. You'll have to change your code to make this work. Search for "cordova inappbrowser" to find the docs and plenty of examples.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I see. I can do that from my app for the first link that opens an external page, but then, what if there is a link within that external page that uses href, what will happen?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
See the docs > https://github.com/apache/cordova-plugin-inappbrowser#cordovainappbrowseropen < you may have to experiment with it to get a full feel of what it does and does not do for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page