How can I keep the keyboard open after the user taps on the "Return" key on the soft keyboard? I'm calling the focus method on "returnPress" event, which works fine on IOS but not on android:
text() {
let textFieldElement = <TextField>this.textField.nativeElement;
textFieldElement.focus();
}
Note: this is also posted on StackOverflow
@TareqAteik try to wrap the focus method in small timeout - most of the times the keyboard focus would be invoked only after the whole UI is loaded.
e.g.
text() {
let textFieldElement = <TextField>this.textField.nativeElement;
setTimeout(function() {
textFieldElement.focus();
}, 300);
}
Thanks, but this wont work, it will hide the keyboard and shows it back again
Okay, turns out I have to override "onEditorAction" method in the "EditorActionListener"...
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Okay, turns out I have to override "onEditorAction" method in the "EditorActionListener"...