Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ionic 3 ios (iphone) : How to prevent keyboard hiding on click of button #148

Open
mkgareja opened this issue Apr 23, 2020 · 0 comments
Open

Comments

@mkgareja
Copy link

mkgareja commented Apr 23, 2020

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>
@mkgareja mkgareja changed the title How to prevent keyboard hiding on click of button Ionic 3 ios (iphone) : How to prevent keyboard hiding on click of button Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant