Select dropdown issue on ios

It is not displaying confirm button when i select for the first time. after then if i select it it will show confirm button.

in my app.js file,

 $ionicPlatform.ready().then(function (){
    if(window.cordova && window.cordova.plugins.Keyboard) {
      cordova.plugins.Keyboard.hideKeyboardAccessoryBar(false);
       cordova.plugins.Keyboard.disableScroll(true);
    }
    if(window.StatusBar) {
      StatusBar.styleDefault();
    }
  })

Where should I put this code to? :confused:

Should it work with IonicView?

Still having this problem, any other ideas? window.cordova.plugins.Keyboard.hideKeyboardAccessoryBar(false); does not work

Nevermind it has to be outside of the If statement and you have to actually test on a device, doing it via ionic devapp doesn’t work.

app.component.ts

import { Keyboard } from '@ionic-native/keyboard/ngx';

constructor(private keyboard: Keyboard) {}

    initializeApp(): void {
        this.platform.ready().then(() => {
            this.statusBar.styleDefault();
            this.statusBar.overlaysWebView(false);
            this.splashScreen.hide();

            // Select dropdown issue on iOS
            // https://forum.ionicframework.com/t/ionic-ionic-vew-and-hidekeyboardaccessorybar/118055
            if (this.platform.is('ios')) {
                this.keyboard.hideFormAccessoryBar(false);
            }
        });
    }