Mazz
Mazz

Reputation: 1879

Cordova hideKeyboardAccessoryBar not working

I access the plugin in $ionicPlatform.ready like this (default in ionic)

if (window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard) {
      cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
      cordova.plugins.Keyboard.disableScroll(true);
}

If i understood it right the hideKeyboardAccessoryBar should hide the Keyboard if i press the go, submit, next, ... Button. enter image description here

But if i click one of those Buttons, the keyboard doesn't hide. Neither in the iosEmulator nor on a real device.

Upvotes: 0

Views: 3678

Answers (1)

Mudasser Ajaz
Mudasser Ajaz

Reputation: 6257

Use cordova.plugins.Keyboard.close(); to hide keyboard. hideKeyboardAccessoryBar is used to hide/disable accessory bar of keyboard, not whole keyboard.

Upvotes: 1

Related Questions