# Keep the keyboard up and Focus on text field after submit on Angular2

**URL:** <https://forum.ionicframework.com/t/keep-the-keyboard-up-and-focus-on-text-field-after-submit-on-angular2/61480>\
**Category:** ionic-v3\
**Created:** [August 24, 2016, 4:23pm UTC](https://forum.ionicframework.com/t/keep-the-keyboard-up-and-focus-on-text-field-after-submit-on-angular2/61480 "2016-08-24T16:23:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![borys\_duda](https://avatars.discourse-cdn.com/v4/letter/b/a4c791/32.png) [@borys\_duda](https://forum.ionicframework.com/u/borys_duda)\
**Post date:** [August 24, 2016, 4:23pm UTC](https://forum.ionicframework.com/t/keep-the-keyboard-up-and-focus-on-text-field-after-submit-on-angular2/61480/1 "2016-08-24T16:23:37Z")

</div>

I’m creating an app with a chat room for iOS and when I send a new message it blurs the input field and the keyboard slides down. I already tried all solutions from following article, but not work.

> [@Keep the keyboard up and Focus on text field after submit](https://forum.ionicframework.com/t/keep-the-keyboard-up-and-focus-on-text-field-after-submit/3724):
>
> I’m creating an app with a chat room and when I submit a new message it blurs the input field and the keyboard slides down. What would be a good way to keep the focus on the field and keep the keyboard up? I started out with the autofocus html tag and that makes the input field start autofocused in the browser but not in the emulator or device. Then I tried ng-focus="true" and ng-focus="contentFocus" and set it true before and as a callback to the POST call and still no dice.

Is there any solution to make it work properly? Thanks

---

<div class="post-metadata">

**Author:** ![malma67](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@malma67](https://forum.ionicframework.com/u/malma67)\
**Post date:** [August 26, 2016, 8:01am UTC](https://forum.ionicframework.com/t/keep-the-keyboard-up-and-focus-on-text-field-after-submit-on-angular2/61480/2 "2016-08-26T08:01:23Z")

</div>

It does not yet seem possible to implement a simple chat page in Ionic2 where the keyboard stays up in between messages.

Im surprised as the chat functionality is a basic thing used by many apps.

---

<div class="post-metadata">

**Author:** ![nicopeeters](https://avatars.discourse-cdn.com/v4/letter/n/848f3c/32.png) [@nicopeeters](https://forum.ionicframework.com/u/nicopeeters)\
**Post date:** [March 7, 2017, 12:40pm UTC](https://forum.ionicframework.com/t/keep-the-keyboard-up-and-focus-on-text-field-after-submit-on-angular2/61480/3 "2017-03-07T12:40:13Z")

</div>

Did you manage to find a solution for this? I’m also creating a chat app and struggling with this.

---

<div class="post-metadata">

**Author:** ![collinsushigmailcom](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/collinsushigmailcom/32/149051_2.png) [@collinsushigmailcom](https://forum.ionicframework.com/u/collinsushigmailcom)\
**Post date:** [April 9, 2019, 1:47am UTC](https://forum.ionicframework.com/t/keep-the-keyboard-up-and-focus-on-text-field-after-submit-on-angular2/61480/4 "2019-04-09T01:47:30Z")

</div>

use this simple combination;

\<ion-button (mousedown)="$event.preventDefault(); sendTheMessage()"\>
