After I run my code on my android device and click on a input element i can fill the input content with the keyboard, then when I click again the input. It is blocked and I can not type again. I want to know if my code is ok or Im missing something
Only when i not use ion-input on ion-list => ion-item tags I can select it many times.
Android Version: 6.0.1
Code:
<ion-content padding>
<form [formGroup]="loginForm">
<ion-list>
<ion-item class="item-login-banner" no-lines>
<div class="banner"></div>
</ion-item>
<ion-item class="item-login-input">
<ion-label floating color="dark">Correo ElectrĂłnico</ion-label>
<ion-input #txtUsername type="text" formControlName="username" (keyup.enter)=focusPasswordField()></ion-input>
</ion-item>
<ion-item class="item-login-input">
<ion-label floating color="dark">Contraseña</ion-label>
<ion-input #txtPassword type="password" formControlName="password" (keyup.enter)="logIn()"></ion-input>
</ion-item>
<ion-item class="item-login-button" no-lines>
<button ion-button full (click)="logIn()">Iniciar SesiĂłn</button>
</ion-item>
</ion-list>
</form>
</ion-content>
...
...
...
@IonicPage()
@Component({
selector: 'page-login',
templateUrl: 'login.html'
})
export class LoginPage {
@ViewChild("txtPassword") txtPassword;
constructor(private formBuilder: FormBuilder) {
this.loginForm = this.formBuilder.group({
username: ['', Validators.required],
password: ['', Validators.required]
});
}
focusPasswordField() {
this.txtPassword.setFocus();
}
logIn() {
let username = this.loginForm.get("username").value.trim();
let password = this.loginForm.get("password").value.trim();
...
...
}
}
...