Ionic 4 missing buttons on select dropdown element in InAppBrowser

爷,独闯天下 提交于 2019-12-10 12:04:43

问题


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:


回答1:


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



来源:https://stackoverflow.com/questions/51084758/ionic-4-missing-buttons-on-select-dropdown-element-in-inappbrowser

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