Open dodontommy opened 8 years ago
This directive fixed it for me:
.directive('form', function () {
return function () {
if (window.cordova && window.cordova.plugins.Keyboard && navigator.userAgent.match(/(iPod|iPhone|iPad)/)) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(false);
}
};
}
);
hideKeyboardAccessoryBar(false) doesnt work in iOS 9 for some reason, it has been completely ignore and keyboard was shown without "<", ">" and "done" button, which make user unable to hide their keyboard after input.
I've accomplished a different workaround on this.
angular.module('app')
.run(function($rootScope, $ionicPlatform, $ionicScrollDelegate){
$ionicPlatform.ready(function () {
if (window.cordova && window.cordova.plugins.Keyboard){
cordova.plugins.Keyboard.disableScroll(true); // This will prevent the view to bounce when inputs are on focus
}
});
$rootScope.$on('$ionicView.loaded', function () {
if (window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(false); // This makes the accessory bar visible and it only works when the view is loaded and DOM ready
}
});
window.addEventListener('native.keyboardshow', function () {
$ionicScrollDelegate.scrollBy(0, 1); //This will return focus to the current input once the keyboard slides-up in the view
});
};)
@alejandro-heredia-coderoad-com This fix does not work for me. the hideKeyboardAccessoryBar(false)
is stil being ignored.
Anyone know why?
For us, hideKeyboardAccessoryBar(false) works for IOS 9 and IOS 10 for the KEYBOARD. But for IOS 10, the accessory bar is NOT visible for the SELECT pane: it is not possible to select any value, or to leave the select pane.
We have also this problem. In IOS 10 keyboard accessories did not show.
For iOS10 I am unable to get any inputs to show the keyboard accessory bar.
Any ideas?
I'm using Ionic 2.0.0-rc.1
and this: Keyboard.hideKeyboardAccessoryBar(false);
works fine in the iOS simulator when running on 9.3. However, when running on a device in the simulator with iOS 10, I only see the arrows and done button with NO KEYBOARD. Appears to be related to the plugin itself. Opened new issue #232 for this.
This completely breaks the functionality of dropdown menus on both iOS and Android and makes apps with them pretty much unusable.