InAppBrowser中选择下拉元素上的Ionic 4缺少按钮 [英] Ionic 4 missing buttons on select dropdown element in InAppBrowser

查看:375
本文介绍了InAppBrowser中选择下拉元素上的Ionic 4缺少按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 cordova-plugin-inappbrowser 打开一个页面并打开下拉列表/选择列表,我得到了列表,但没有显示任何确认或取消按钮。我在普通的应用程序中得到了这些inAppBrowser。



这个答案没有解决我的问题,因为该元素在inAppBrowser中,我想:
之后,我开始尝试随机选项。
解决方案是在选项中使用formsheet作为presentationstyle:

  this.inAppBrowser.create(
url,
target,
{
presentationstyle:formsheet,//仅iOS选项
},
);

查看截图,效果如下:



在此输入图片说明


Opening a page with the cordova-plugin-inappbrowser and opening a dropdown/select list, I get the list, but without any confirm or cancel buttons displayed. I do get these outside of the inAppBrowser, in my normal app.

This answer does not solve my question, because the element is inside the inAppBrowser, I think: https://stackoverflow.com/a/41203014/10005883

Now I can't close the select / dropdown element, unless I "click" something on the page containing this element.

Is there any way to add buttons to the select / dropdown element in the inAppBrowser? I want the user to be able to close this select element from the select element.

Using:

"cordova-ios": "~4.5.4"
"cordova-plugin-ionic": "^4.1.3"
"@ionic-native/core": "^4.6.0"
"cordova-plugin-inappbrowser": "^2.0.2"

Here is a screenshot of what I get now, I want buttons at the top of the grey block:

解决方案

After reading the documentation again, I started trying random options. The solution is to use "formsheet" as presentationstyle, in the options:

this.inAppBrowser.create(
    url,
    target,
    {
        presentationstyle: "formsheet", // iOS only option
    },
);

See screenshot, for the effect:

enter image description here

这篇关于InAppBrowser中选择下拉元素上的Ionic 4缺少按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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