diff --git a/core/src/components/tab-bar/tab-bar.tsx b/core/src/components/tab-bar/tab-bar.tsx index 6924f263e5..6466dd7777 100644 --- a/core/src/components/tab-bar/tab-bar.tsx +++ b/core/src/components/tab-bar/tab-bar.tsx @@ -51,14 +51,14 @@ export class TabBar implements ComponentInterface { /** @internal */ @Event() ionTabBarChanged!: EventEmitter; - @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; } }