Ionic 2 - keep keyboard open when pressing submit button
the ionic keyboard opens when the input field / textarea becomes focused (?).
But when I hit the submit button, the keyboard disappears.
even when i call keyboard.show () method of keyboard plugin it first disappears and then reappears.
Is there a solution for this?
<textarea id="chat-text-area></textarea> sendMessage() { if(window.cordova){ this.keyboard.show() } if(this.form.valid){ this.service.post(this.form.value).subscribe(res=>{ document.getElementById('chat-text-area').focus() }) } }
+3
source to share
2 answers