HideKeyboardAccessoryBar not showing Done button

#1

I have the following code in my app.component.ts file:

import { StatusBar, Splashscreen, Keyboard } from 'ionic-native';

platform.ready().then(() => {
   Keyboard.hideKeyboardAccessoryBar(false);
   StatusBar.styleDefault();
   Splashscreen.hide();              
});

Unfortunately, I’m not seeing the Done button (or any difference on the keyboard) for ios. Is this the proper technique for getting the Done button to show on the ios keyboard? I need a way for the user to close the keyboard while viewing a list of items. Clicking on an item in the list navigates to a different page which is why I would like to have a Done button to allow them to close the keyboard and not click on a list item. I have updated the ionic-plugin-keyboard to 2.2.1.

#2

@killmore, did you find the answer to your question? I’m having a similar issue

#3

Hi, @gigocabrera or @killmore , Any of you got any workaround for this issue?

#4

Have you checked if the method gets called?
I had this issue because of an ionic update where ionViewDidLoad changed to ionViewDidEnter and the method was never called.

#5

The snippet below fixed my issue. I had to deploy to my iPhone a couple of times and it worked.
Keyboard.hideKeyboardAccessoryBar(false);

#6

How did you checked this? I try to test in real device by Ionic View and accessory bar doesnt appears :frowning:

#7

I was struggling with this too. Finally stumbled onto:

	this.platform.ready().then(() => {
			this.keyboard.hideFormAccessoryBar(true);
			this.keyboard.hideFormAccessoryBar(false);
         ...

and it now works. Note also that the keyboard instance is injected now vs. using static Keyboard method.

2 Likes
#8

Hi snort,

Is it in the app.component.ts?

#9

For me, I had to actually BUILD and RUN locally on a device. IonicDevApp would not show done button.