Search code examples
cordovaionic-frameworkcordova-pluginsinappbrowserionic4

Ionic 4 missing buttons on select dropdown element in InAppBrowser


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:

select dropdown not showing any cancel or confirmation buttons


Solution

  • 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