Show hide icon ionic3

#1
THIS IS PAGE.HTML

          <ion-item class="input2">
              <ion-label><ion-icon name="ios-lock-outline" class="icon"></ion-icon></ion-label>
               <ion-input [type]="getType()" placeholder="Password" #pass></ion-input>
               <ion-icon name="eye" item-right (click)="toggleTextPassword()"></ion-icon>
          </ion-item>

THIS IS PAGE.TS

  isActiveToggleTextPassword: Boolean = true;

public toggleTextPassword(): void{
        this.isActiveToggleTextPassword = (this.isActiveToggleTextPassword == true) ? false:true;
    }
  public getType() {
      return this.isActiveToggleTextPassword ? 'password' : 'text';
  }

This works, but just in chrome and i have to tap double click at first, and when i emulate this on a phone this icon just does not work, when i tap the icon the keyboard open and if i click again it just close. Do someone know whats the problem?