# Hide footer when keyboard appear

**URL:** <https://forum.ionicframework.com/t/hide-footer-when-keyboard-appear/9254>\
**Category:** uncategorized\
**Created:** [September 6, 2014, 6:45pm UTC](https://forum.ionicframework.com/t/hide-footer-when-keyboard-appear/9254 "2014-09-06T18:45:04Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bigoo](https://avatars.discourse-cdn.com/v4/letter/b/2acd7d/32.png) [@Bigoo](https://forum.ionicframework.com/u/Bigoo)\
**Post date:** [September 6, 2014, 6:45pm UTC](https://forum.ionicframework.com/t/hide-footer-when-keyboard-appear/9254/1 "2014-09-06T18:45:04Z")

</div>

Hi everyone,

I have an issue with the footer-bar, when an input is focused ( in the ion-content ) the keyboard appear and the footer stay above the keyboard. The thing is that it hides what is under the input, particularly in landscape mode, and so hide the popover that appear under the focused input.

Anyone know how to solve this problem? Can I hide the footer when the keyboard appear?

Thanks

---

<div class="post-metadata">

**Author:** ![bengtler](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/bengtler/32/98565_2.png) [@bengtler](https://forum.ionicframework.com/u/bengtler)\
**Post date:** [September 8, 2014, 5:55am UTC](https://forum.ionicframework.com/t/hide-footer-when-keyboard-appear/9254/2 "2014-09-08T05:55:57Z")

</div>

With ionic keyboard plugin you can hide tags if the keyboard is open.

In my cases this not totally works, so you can look at your body… if the keyboard is open a class is added -\> so you can build a css selector with this class and the ion-footer to hide footer or set height to 0.

greetz, bengtler

---

<div class="post-metadata">

**Author:** ![Bigoo](https://avatars.discourse-cdn.com/v4/letter/b/2acd7d/32.png) [@Bigoo](https://forum.ionicframework.com/u/Bigoo)\
**Post date:** [September 8, 2014, 10:12am UTC](https://forum.ionicframework.com/t/hide-footer-when-keyboard-appear/9254/3 "2014-09-08T10:12:45Z")

</div>

It seems to be exactly what I want.  
I’ll check this.

Thank you.

Edit : Yeah it seems to work, but even if the footer is hidden, A blank rectangle is still there above the keyboard. I don’t know what it is.

---

<div class="post-metadata">

**Author:** ![bengtler](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/bengtler/32/98565_2.png) [@bengtler](https://forum.ionicframework.com/u/bengtler)\
**Post date:** [September 8, 2014, 10:45am UTC](https://forum.ionicframework.com/t/hide-footer-when-keyboard-appear/9254/4 "2014-09-08T10:45:46Z")

</div>

hmm strange.

i used this for an ios app and it works.  
On which platform occurs the issue?

Otherwise you could try this:  
If you have ion-content, ion-footer, ion-header -\> the scrollcontent size is calculated by ionic.  
If you hide the whole footer you can call $ionScrollDelegate.resize() in your controller to calculate correct ion-content height.

---

<div class="post-metadata">

**Author:** ![Bigoo](https://avatars.discourse-cdn.com/v4/letter/b/2acd7d/32.png) [@Bigoo](https://forum.ionicframework.com/u/Bigoo)\
**Post date:** [September 8, 2014, 11:02am UTC](https://forum.ionicframework.com/t/hide-footer-when-keyboard-appear/9254/5 "2014-09-08T11:02:07Z")

</div>

I use this on android platform.  
I can’t test on iOS because I code on windows.  
I’m not good enough with Ionic and with the english language to understand totally what you mean but I’ll check in the documentation.  
Thanks.

---

<div class="post-metadata">

**Author:** ![ZhangChuang](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/zhangchuang/32/6984_2.png) [@ZhangChuang](https://forum.ionicframework.com/u/ZhangChuang)\
**Post date:** [September 18, 2014, 8:08am UTC](https://forum.ionicframework.com/t/hide-footer-when-keyboard-appear/9254/6 "2014-09-18T08:08:43Z")

</div>

Try to do this:

```
.keyboard-open .tabs{
  display:none;
  }
.keyboard-open .has-tabs{
 bottom:0;
 }
```

---

<div class="post-metadata">

**Author:** ![rodneyjoyce](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@rodneyjoyce](https://forum.ionicframework.com/u/rodneyjoyce)\
**Post date:** [October 5, 2014, 10:50pm UTC](https://forum.ionicframework.com/t/hide-footer-when-keyboard-appear/9254/7 "2014-10-05T22:50:03Z")

</div>

You can put **hide-on-keyboard-open** on the Footer - see [http://ionicframework.com/docs/api/page/keyboard/](http://ionicframework.com/docs/api/page/keyboard/)

---

<div class="post-metadata">

**Author:** ![mrsean2k](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mrsean2k/32/65706_2.png) [@mrsean2k](https://forum.ionicframework.com/u/mrsean2k)\
**Post date:** [October 8, 2014, 11:55pm UTC](https://forum.ionicframework.com/t/hide-footer-when-keyboard-appear/9254/8 "2014-10-08T23:55:53Z")

</div>

Using ion-footer-bar, I’ve added that class:

```
<ion-footer-bar class="hide-on-keyboard-open">
  <div class="button-bar">
    <button class="button icon-right ion-pin">Post</button>
    <button class="button icon-right ion-person">My account</button>
    <button class="button icon-right ion-settings">Settings</button>
  </div>
</ion-footer-bar>

```

however although the element is hidden, it leaves a blank space of the same size as the footer at the bottom of the foreshortened screen that still overlaps the rest of the content.

It’s less distracting than having the complete footer float on the top of the keyboard but still not the effect I was after

Is there something else I need to do to remove the footer altogether using this class?

---

<div class="post-metadata">

**Author:** ![veebha](https://avatars.discourse-cdn.com/v4/letter/v/ce7236/32.png) [@veebha](https://forum.ionicframework.com/u/veebha)\
**Post date:** [December 6, 2014, 11:45am UTC](https://forum.ionicframework.com/t/hide-footer-when-keyboard-appear/9254/9 "2014-12-06T11:45:10Z")

</div>

I also face the same issue. Any help?

---

<div class="post-metadata">

**Author:** ![calebcr](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@calebcr](https://forum.ionicframework.com/u/calebcr)\
**Post date:** [January 5, 2015, 5:20pm UTC](https://forum.ionicframework.com/t/hide-footer-when-keyboard-appear/9254/10 "2015-01-05T17:20:38Z")

</div>

I found one solution, in your \< ion-footer-bar \> add the class “hide-on-keyboard-open” and add in your css this lines:  
body.keyboard-open .has-footer{   
bottom: 0;  
}  
I hope this is useful for you

---

<div class="post-metadata">

**Author:** ![bicpi](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/bicpi/32/68151_2.png) [@bicpi](https://forum.ionicframework.com/u/bicpi)\
**Post date:** [February 24, 2015, 11:59am UTC](https://forum.ionicframework.com/t/hide-footer-when-keyboard-appear/9254/11 "2015-02-24T11:59:19Z")

</div>

@calebcr This was really helpful, thank you! I think this should be the default behavior because otherwise adding the class “hide-on-keyboard-open” is not really hiding the footer.

---

<div class="post-metadata">

**Author:** ![vanessasoutoc](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/vanessasoutoc/32/76454_2.png) [@vanessasoutoc](https://forum.ionicframework.com/u/vanessasoutoc)\
**Post date:** [April 23, 2015, 3:04pm UTC](https://forum.ionicframework.com/t/hide-footer-when-keyboard-appear/9254/12 "2015-04-23T15:04:57Z")

</div>

For me working. But with a lag… but working

thank you

---

<div class="post-metadata">

**Author:** ![vendis](https://avatars.discourse-cdn.com/v4/letter/v/c6cbf5/32.png) [@vendis](https://forum.ionicframework.com/u/vendis)\
**Post date:** [July 25, 2015, 10:51am UTC](https://forum.ionicframework.com/t/hide-footer-when-keyboard-appear/9254/13 "2015-07-25T10:51:34Z")

</div>

Thanks, the solution is super

---

<div class="post-metadata">

**Author:** ![bwasnie1](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/bwasnie1/32/8494_2.png) [@bwasnie1](https://forum.ionicframework.com/u/bwasnie1)\
**Post date:** [September 15, 2015, 8:59am UTC](https://forum.ionicframework.com/t/hide-footer-when-keyboard-appear/9254/14 "2015-09-15T08:59:35Z")

</div>

After facing the same issue with the delay, I did the following:

1. Install [Cordova Keyboard](http://ngcordova.com/docs/plugins/keyboard/)

2. Put this in your app.run() function:

3. add ng-hide=“keyboardOpen” in your footer element

4. add ng-class="{‘has-footer’: !keyboardOpen}" in your ion-content element

I have no delays anymore with this.

---

<div class="post-metadata">

**Author:** ![cannycookie](https://avatars.discourse-cdn.com/v4/letter/c/e19adc/32.png) [@cannycookie](https://forum.ionicframework.com/u/cannycookie)\
**Post date:** [September 15, 2015, 10:37am UTC](https://forum.ionicframework.com/t/hide-footer-when-keyboard-appear/9254/15 "2015-09-15T10:37:55Z")

</div>

Sounds like a good idea @bwasnie1 but our tab bar includes ion-nav-views so all content will be hidden.

Unless there is a way to add the ng-hide programmatically to the div class=“tabs” after it is created.

Hope the lovely people at ionic will include a fix for this, at the moment we have a 1 second delay before the footer slides down after the keyboard opens ☹

---

<div class="post-metadata">

**Author:** ![rkbharti](https://avatars.discourse-cdn.com/v4/letter/r/d9b06d/32.png) [@rkbharti](https://forum.ionicframework.com/u/rkbharti)\
**Post date:** [September 28, 2015, 10:47am UTC](https://forum.ionicframework.com/t/hide-footer-when-keyboard-appear/9254/16 "2015-09-28T10:47:44Z")

</div>

hey frnd replace this code to your app.js file

cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);  
cordova.plugins.Keyboard.disableScroll(false);

don’t say thanks…

---

<div class="post-metadata">

**Author:** ![munniemun](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@munniemun](https://forum.ionicframework.com/u/munniemun)\
**Post date:** [October 2, 2015, 8:07am UTC](https://forum.ionicframework.com/t/hide-footer-when-keyboard-appear/9254/17 "2015-10-02T08:07:39Z")

</div>

Hi @cannycookie, I have the same issue too. Have you get the solution? ☹

---

<div class="post-metadata">

**Author:** ![trevor62590](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@trevor62590](https://forum.ionicframework.com/u/trevor62590)\
**Post date:** [March 3, 2016, 4:30pm UTC](https://forum.ionicframework.com/t/hide-footer-when-keyboard-appear/9254/18 "2016-03-03T16:30:46Z")

</div>

This worked for me. Thanks. They need to fix ‘keyboard-attach’ so that the scroll view realizes when the footer is covering an input and scrolls the additional 50px or so.

---

<div class="post-metadata">

**Author:** ![ofershapira](https://avatars.discourse-cdn.com/v4/letter/o/d6d6ee/32.png) [@ofershapira](https://forum.ionicframework.com/u/ofershapira)\
**Post date:** [May 1, 2016, 7:24am UTC](https://forum.ionicframework.com/t/hide-footer-when-keyboard-appear/9254/19 "2016-05-01T07:24:27Z")

</div>

+1 to the css solution for Android, its an ionic css bug, when keyboard opens it should remove the bottom gap  
the solution is to add to your css file the script  
.keyboard-open .has-footer {  
bottom: 0;  
}

---

<div class="post-metadata">

**Author:** ![theyouishere](https://avatars.discourse-cdn.com/v4/letter/t/3bc359/32.png) [@theyouishere](https://forum.ionicframework.com/u/theyouishere)\
**Post date:** [June 9, 2016, 2:03pm UTC](https://forum.ionicframework.com/t/hide-footer-when-keyboard-appear/9254/20 "2016-06-09T14:03:22Z")

</div>

I kinda tried everything, I am using IONIC 2 so my footer looks like  
`<ion-toolbar position="bottom"> <button ptcolor clear> <ion-icon name='help'></ion-icon> </button> <button ptcolor clear> <ion-icon name='settings'></ion-icon> </button> </ion-toolbar>`

i installed the keyboard plugin, tried to use the class=“hide-on-keyboard-open”, added css, nothing worked. Still have the footer when my keyboard is open. I even tried to change the HTML to put it the old way with an ion-footer-bar but still nothing worked.

If any of you guys still on this, would appreciate any help !

thanks !!

[Next page](https://forum.ionicframework.com/t/hide-footer-when-keyboard-appear/9254.md?page=2)
