ionic-team / ionic-plugin-keyboard

Ionic Keyboard Plugin for Cordova
Apache License 2.0
611 stars 278 forks source link

Why is hideKeyboardAccessoryBar true by default? #218

Open dodontommy opened 7 years ago

dodontommy commented 7 years ago

This completely breaks the functionality of dropdown menus on both iOS and Android and makes apps with them pretty much unusable.

ghost commented 7 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);
        }
      };
    }
  );
dawnseeker8 commented 7 years ago

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.

ghost commented 7 years ago

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
      });

};)
Fyson commented 7 years ago

@alejandro-heredia-coderoad-com This fix does not work for me. the hideKeyboardAccessoryBar(false) is stil being ignored.

Anyone know why?

LogicsSoftware commented 7 years ago

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.


naviloper commented 7 years ago

We have also this problem. In IOS 10 keyboard accessories did not show.

wdoyle commented 7 years ago

For iOS10 I am unable to get any inputs to show the keyboard accessory bar.

Any ideas?

keithdmoore commented 7 years ago

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.