MOBILE-2430 ux: Hide Bottom tabs when keyboard is open

main
Pau Ferrer Ocaña 2018-06-22 10:36:09 +02:00
parent aebf5d317f
commit 0ccb6b2485
2 changed files with 6 additions and 0 deletions

View File

@ -815,3 +815,7 @@ ion-alert.core-inapp-notification {
font-size: 16px;
}
}
body.keyboard-is-open core-ion-tabs .tabbar {
display: none;
}

View File

@ -77,6 +77,7 @@ export class CoreAppProvider {
this.keyboard.onKeyboardShow().subscribe((data) => {
// Execute the callback in the Angular zone, so change detection doesn't stop working.
zone.run(() => {
document.body.classList.add('keyboard-is-open');
this.isKeyboardShown = true;
events.trigger(CoreEventsProvider.KEYBOARD_CHANGE, this.isKeyboardShown);
});
@ -84,6 +85,7 @@ export class CoreAppProvider {
this.keyboard.onKeyboardHide().subscribe((data) => {
// Execute the callback in the Angular zone, so change detection doesn't stop working.
zone.run(() => {
document.body.classList.remove('keyboard-is-open');
this.isKeyboardShown = false;
events.trigger(CoreEventsProvider.KEYBOARD_CHANGE, this.isKeyboardShown);
});