Reputation: 305
When I click on a input field I get the Android keyboard. On the keyboard there is a "Go" which just hides the keyboard when I click on it. I would like the "Go" button to submit the form. I am using Sencha Touch 2. Is there an event listener in PhoneGap for Android's keyboard "Go" button?
Upvotes: 2
Views: 2459
Reputation: 757
You can insert your logic on below code:
$("#xyz").keyup(function(e){
if(e.which == 13)
{
submit();
}
});
Upvotes: 0
Reputation: 236
The 'action' event on the input field will fire when the 'go' button is used.
Documentation at: http://docs.sencha.com/touch/2-0/#!/api/Ext.field.Text-event-action
Upvotes: 3
Reputation: 23273
No, not to my knowledge. However, if you are willing to make a minor assumption you can listen for the "hidekeyboard" event. Once the user clicks the Go button the keyboard should disappear. The only problem with this solution is that the keyboard may go away for some other reason.
Upvotes: 0