diff --git a/src/components/tabs/tabs.ts b/src/components/tabs/tabs.ts
index a37b4a9f5b6..a1223318d31 100644
--- a/src/components/tabs/tabs.ts
+++ b/src/components/tabs/tabs.ts
@@ -5,6 +5,7 @@ import { Config } from '../../config/config';
import { DeepLinker } from '../../navigation/deep-linker';
import { Ion } from '../ion';
import { isBlank, assert } from '../../util/util';
+import { Keyboard } from '../../platform/keyboard';
import { Tabs as ITabs } from '../../navigation/nav-interfaces';
import { NavController } from '../../navigation/nav-controller';
import { NavControllerBase } from '../../navigation/nav-controller-base';
@@ -151,7 +152,7 @@ import { ViewController } from '../../navigation/view-controller';
@Component({
selector: 'ion-tabs',
template:
- '
' +
+ '
' +
@@ -177,6 +178,10 @@ export class Tabs extends Ion implements AfterViewInit, RootNode, ITabs {
_selectHistory: string[] = [];
/** @internal */
_resizeObs: any;
+ /** @internal */
+ _keyboardObs: any;
+ /** @internal */
+ _tabbarVisible = true;
/**
* @input {number} The default selected tab index when first loaded. If a selected index isn't provided then it will use `0`, the first tab.
@@ -231,7 +236,8 @@ export class Tabs extends Ion implements AfterViewInit, RootNode, ITabs {
elementRef: ElementRef,
private _plt: Platform,
renderer: Renderer,
- private _linker: DeepLinker
+ private _linker: DeepLinker,
+ keyboard: Keyboard
) {
super(config, elementRef, renderer, 'tabs');
@@ -261,9 +267,16 @@ export class Tabs extends Ion implements AfterViewInit, RootNode, ITabs {
viewCtrl._setContent(this);
viewCtrl._setContentRef(elementRef);
}
+
+ if (config.getBoolean('keyboardResizes', false)) {
+ keyboard.didChange.subscribe((visible: boolean) => {
+ this._tabbarVisible = visible
+ });
+ }
}
ngOnDestroy() {
+ this._keyboardObs && this._keyboardObs.unsubscribe();
this._resizeObs && this._resizeObs.unsubscribe();
this.parent.unregisterChildNav(this);
}