Hey guys. Ran into a small problem here and I hope you guys can help me out. I have attached 2 screenshots. In the first screenshot, when I press the send button (->) on the emulator keyboard, the click event for the hidden send button is activated and the message is sent. This is correct.
The problem occurs in the second screenshot, where I add a new disconnect button. In the second screenshot, the send button on the keyboard activates the click event for the disconnect button, instead of the send button.
I have 2 questions:
How can I make sure the send button on the keyboard activates the “send” button click event instead of the disconnect click event?
How can I implement a feature where on click, the words in the “disconnect” button change from “disconnect” to “really?” and then when the user clicks the “really?” button the click event is fired? This is to act as confirmation that the user really wants to disconnect.
<ion-footer> <form #f="ngForm"> <ion-grid> <ion-row> <ion-col col-4> <button ion-button full (click)="onDisconnect()">Disconnect</button> </ion-col> <ion-col> <ion-input [(ngModel)]="chat" name="chatText" required placeholder="Type Here..."></ion-input> <button style="position: absolute; left: -9999px; width: 1px; height: 1px;" (click)="chatSend()">Send</button> </ion-col> </ion-row> </ion-grid> </form> </ion-footer>