cordova-plugin-ionic-keyboard
cordova-plugin-ionic-keyboard copied to clipboard
Ionic 3 ios (iphone) : How to prevent keyboard hiding on click of button
I m working on the chat application ionic 3 ios. so on click of the send button keyboard should remain open. for android, it's working fine but for ios no luck. I gave up now its more than a month.
I tried following things but it's not working. (1) this.sndbtn.setFocus(); (2) $event.preventDefault()
code
<ion-footer [class]="className" [keyboardAttach]="content" id="input-footer">
<ion-icon name="list-box" tappable (click)="openModal()"></ion-icon>
<ion-toolbar>
<ion-item class="input-item">
<ion-input #sndbtn id="msg" [disabled]="currentChatStatus (keypress)="addNewMsg($event, selectedChat)" class="msg-input-box"> </ion-input>
</ion-item>
</ion-toolbar>
<button ion-button (touchstart)="addNewMsg($event);$event.preventDefault()">
<ion-icon name="paper-plane"></ion-icon>
</button>
</ion-footer>