fix(tab-bar): hide on keyboard events (#16688)

fixes #16419
This commit is contained in:
Manu MA
2018-12-11 16:29:55 +01:00
committed by GitHub
parent 1f78a7c56a
commit 147380533c

View File

@@ -51,14 +51,14 @@ export class TabBar implements ComponentInterface {
/** @internal */
@Event() ionTabBarChanged!: EventEmitter<TabBarChangedDetail>;
@Listen('body:keyboardWillHide')
@Listen('window:keyboardWillHide')
protected onKeyboardWillHide() {
setTimeout(() => this.keyboardVisible = false, 50);
}
@Listen('body:keyboardWillShow')
@Listen('window:keyboardWillShow')
protected onKeyboardWillShow() {
if (this.el.getAttribute('slot') === 'bottom') {
if (this.el.getAttribute('slot') !== 'top') {
this.keyboardVisible = true;
}
}