Inappbrowser not displaying done button on ios with ionic

对着背影说爱祢 提交于 2019-12-11 12:52:49

问题


Having an issue with inappbrowser inside Ionic where the "Done" button does not appear on the page. It seems to be opening the page twice and after mucking about I have somehow caused it to open once in an app window then it will open another version in the browser with a return to app button, the return to app button however takes me back to the page with the pdf open with no Done button.

At one point it would flash up what looked like the pdf with the done button then bring up another one over the top without going to the browser however for whatever reason it doesnt do that now!

So confused as it was showing before and nothing to do with it has been changed.

Here is the piece of code opening it:

window.open('theurl', '_system', 'location=yes');

回答1:


Instead of using _system, try using the following:

window.open('theurl', '_blank', 'location=yes');

As stated by Cordova Documentation:

"_self" -> opens in the Cordova WebView if strUrl is in the white-list, else it opens in the InAppBrowser
"_system" -> always open in the system web browser
"_blank" -> always open in the InAppBrowser

so in essence if you always use the "InAppBrowser" way of _blank, you will always get the "Done" button.



来源:https://stackoverflow.com/questions/34682191/inappbrowser-not-displaying-done-button-on-ios-with-ionic

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!