Inappbrowser没有在带有离子的ios上显示完成按钮 [英] Inappbrowser not displaying done button on ios with ionic

查看:197
本文介绍了Inappbrowser没有在带有离子的ios上显示完成按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

离子内遇到 inappbrowser 问题,其中完成按钮未显示在页面上。它似乎打开了两次页面,在我不知何故导致它在应用程序窗口中打开一次然后它将在浏览器中打开另一个版本并返回应用程序按钮,然后返回应用程序按钮将我带回打开pdf而没有完成按钮的页面。

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.

有一次它会用完成按钮闪现看起来像pdf的东西然后再调出另一个但不管浏览器出于什么原因它现在都没有这样做!

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.

以下是打开它的代码:

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


推荐答案

而不是使用 _system ,尝试使用以下内容:

Instead of using _system, try using the following:

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

如Cordova文档所述:

As stated by Cordova Documentation:


_ self - >在Cordova WebView中打开strUrl在白名单中,否则它在InAppBrowser中打开

_system - >始终在系统Web浏览器中打开

_blank - >始终在InAppBrowser中打开

"_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

所以从本质上讲,如果你总是使用 _blank 的InAppBrowser方式,你将永远得到完成按钮。

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

这篇关于Inappbrowser没有在带有离子的ios上显示完成按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆