Angular *ngIf is lagging on Keyboard popup

Angular *ngIf trigger is lagging one click.
When keyboard pops up, the footer is still shown until a click to any button on the keyboard.
When keyboard hides, the footer is not shown until a click on user interface button.

Converted Angular v14 web project to Android and iOS mobile apps using Capacitor v5.


  1. Using Keyboard plugin to listen to keyboard popup event.
    Keyboard.addListener(‘keyboardDidShow’, info => {
    this.keyboardShown = true;
    Keyboard.addListener(‘keyboardDidHide’, () => {
    this.keyboardShown = false;
    with get/set:
    _keyboardShown: boolean = false;
    set keyboardShown(value){
    this._keyboardShown = value;
    get keyboardShown(){
    return this._keyboardShown;

  2. Then using *ngIf to hide navigation buttons in the bottom of the screen.