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?
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.
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.
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.
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?
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
@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.
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
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.
+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;
}
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 !