# Hiding keyboard accessory bar

**URL:** <https://forum.ionicframework.com/t/hiding-keyboard-accessory-bar/52301>\
**Category:** ionic-v3\
**Created:** [May 17, 2016, 8:24pm UTC](https://forum.ionicframework.com/t/hiding-keyboard-accessory-bar/52301 "2016-05-17T20:24:46Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![lawlesscreation](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/lawlesscreation/32/112836_2.png) [@lawlesscreation](https://forum.ionicframework.com/u/lawlesscreation)\
**Post date:** [May 17, 2016, 8:24pm UTC](https://forum.ionicframework.com/t/hiding-keyboard-accessory-bar/52301/1 "2016-05-17T20:24:46Z")

</div>

I’ve been following the story of iTunes rejecting apps because of the keyboard [http://blog.ionic.io/pluginz-be-buggin/](http://blog.ionic.io/pluginz-be-buggin/) and believe this is now not the case… so I’ve been trying to work out how I hide the damn accessibility bar with no success:

```auto
// app.js

@App({
    template: '<ion-nav [root]="rootPage" swipeBackEnabled="false"></ion-nav>',
    config: {
        // http://ionicframework.com/docs/v2/api/config/Config/
        tabbarPlacement: 'top'
    }
})
export class MyApp {
    static get parameters() {
        return [[Platform]];
    }

    constructor(platform) {
        this.rootPage = HomePage;

        platform.ready().then(() => {
            cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
        });
    }
}

```

Can anyone steer me in the right direction for this? I’ve tried a couple of different approaches from Google but none seem to work when I emulate ios. Am I supposed to import something or in an Ionic 1 example it looked like you could add this using ?

Any help would be appreciated!

---

<div class="post-metadata">

**Author:** ![lawlesscreation](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/lawlesscreation/32/112836_2.png) [@lawlesscreation](https://forum.ionicframework.com/u/lawlesscreation)\
**Post date:** [May 17, 2016, 8:37pm UTC](https://forum.ionicframework.com/t/hiding-keyboard-accessory-bar/52301/2 "2016-05-17T20:37:46Z")

</div>

Ah… typically moments later I’ve found the problem… for some reasons, ionic keeps downloading and installing version 2.1.0:

```auto
Fetching plugin "ionic-plugin-keyboard@~2.1.0" via npm

```

running `npm cache clean` doesn’t seem to help though… I’ve tried downloading 2.2.0 manually but the above code still does not disable the accessory bar.

---

<div class="post-metadata">

**Author:** ![lawlesscreation](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/lawlesscreation/32/112836_2.png) [@lawlesscreation](https://forum.ionicframework.com/u/lawlesscreation)\
**Post date:** [May 18, 2016, 8:24am UTC](https://forum.ionicframework.com/t/hiding-keyboard-accessory-bar/52301/3 "2016-05-18T08:24:33Z")

</div>

On a related note, I’m only trying to disable the accessory bar because the \< \> arrows don’t seem to move focus between form elements. Is that an expected bug in ionic 2 beta 6?

---

<div class="post-metadata">

**Author:** ![lawlesscreation](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/lawlesscreation/32/112836_2.png) [@lawlesscreation](https://forum.ionicframework.com/u/lawlesscreation)\
**Post date:** [May 19, 2016, 7:19pm UTC](https://forum.ionicframework.com/t/hiding-keyboard-accessory-bar/52301/4 "2016-05-19T19:19:23Z")

</div>

Damn, though I had it but still no luck ☹

```auto
// app.js
import {Keyboard} from 'ionic-native';

@App({
    template: '<ion-nav [root]="rootPage" swipeBackEnabled="false"></ion-nav>',
    config: {
        // http://ionicframework.com/docs/v2/api/config/Config/
        tabbarPlacement: 'top'
    }
})
export class MyApp {
    static get parameters() {
        return [[Platform]];
    }

    constructor(platform) {
        this.rootPage = HomePage;

        platform.ready().then(() => {
            Keyboard.hideKeyboardAccessoryBar(true);
        });
    }
}

```

Anyone? Running Ionic serve logs this to the console `hideKeyboardAccessoryBar method has been removed temporarily.` so maybe Ionic 2 beta 6 has removed the functionality?

---

<div class="post-metadata">

**Author:** ![lawlesscreation](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/lawlesscreation/32/112836_2.png) [@lawlesscreation](https://forum.ionicframework.com/u/lawlesscreation)\
**Post date:** [May 19, 2016, 7:43pm UTC](https://forum.ionicframework.com/t/hiding-keyboard-accessory-bar/52301/5 "2016-05-19T19:43:58Z")

</div>

Finally worked it out. Ionic 2 beta 6 has removed the functionality so I uninstalled it and installed:

`cordova plugin add cordova-plugin-keyboard`

then simply:

```auto
// app.js
@App({
    template: '<ion-nav [root]="rootPage" swipeBackEnabled="false"></ion-nav>',
    config: {
        // http://ionicframework.com/docs/v2/api/config/Config/
        tabbarPlacement: 'top'
    }
})
export class MyApp {
    static get parameters() {
        return [[Platform]];
    }

    constructor(platform) {
        this.rootPage = HomePage;

        platform.ready().then(() => {
            Keyboard.hideFormAccessoryBar(true);
        });
    }
}

```

Maybe in the next Ionic 2 release they will add it back in.

---

<div class="post-metadata">

**Author:** ![sebastianlara](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@sebastianlara](https://forum.ionicframework.com/u/sebastianlara)\
**Post date:** [October 19, 2016, 5:20pm UTC](https://forum.ionicframework.com/t/hiding-keyboard-accessory-bar/52301/6 "2016-10-19T17:20:37Z")

</div>

Update your keyboard plugin:

> cordova plugin rm ionic-plugin-keyboard

> cordova plugin add ionic-plugin-keyboard@2.1

done! (works for me)

---

<div class="post-metadata">

**Author:** ![jessepatel](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jessepatel/32/111833_2.png) [@jessepatel](https://forum.ionicframework.com/u/jessepatel)\
**Post date:** [July 25, 2017, 4:29pm UTC](https://forum.ionicframework.com/t/hiding-keyboard-accessory-bar/52301/7 "2017-07-25T16:29:33Z")

</div>

Did your app get approved?

---

<div class="post-metadata">

**Author:** ![jayzhalcyon](https://avatars.discourse-cdn.com/v4/letter/j/5e9695/32.png) [@jayzhalcyon](https://forum.ionicframework.com/u/jayzhalcyon)\
**Post date:** [August 2, 2018, 2:48am UTC](https://forum.ionicframework.com/t/hiding-keyboard-accessory-bar/52301/8 "2018-08-02T02:48:00Z")

</div>

didn’t worked for me

---

<div class="post-metadata">

**Author:** ![tokuhara](https://avatars.discourse-cdn.com/v4/letter/t/c57346/32.png) [@tokuhara](https://forum.ionicframework.com/u/tokuhara)\
**Post date:** [August 14, 2018, 7:38pm UTC](https://forum.ionicframework.com/t/hiding-keyboard-accessory-bar/52301/9 "2018-08-14T19:38:38Z")

</div>

The ionic-native doesn’t work with the new plugin… I had to import it manually.  
1 - Remove the old keyboard plugin  
2 - Add the new plugin - [https://github.com/ionic-team/cordova-plugin-ionic-keyboard](https://github.com/ionic-team/cordova-plugin-ionic-keyboard)  
3 - Import the plugin into your app.component.ts without ionic-native like below:

```auto
declare var Keyboard: any;

```

4 - After the platform.ready().then(()… insert the one of the code below to hide or show:

```auto
Keyboard.hideFormAccessoryBar(false); //show accessory bar
Keyboard.hideFormAccessoryBar(true); //hide accessory bar

```

Hope it helps!
