Inappbrowser not displaying done button on ios wit

2019-08-10 08:20发布

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条回答
小情绪 Triste *
2楼-- · 2019-08-10 08:37

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.

查看更多
登录 后发表回答