- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
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!
- Теги:
- HTML5
- Intel® XDK
Ссылка скопирована
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
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.
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
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?
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
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.
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
- Подписка на RSS-канал
- Отметить тему как новую
- Отметить тему как прочитанную
- Выполнить отслеживание данной Тема для текущего пользователя
- Закладка
- Подписаться
- Страница в формате печати