Is there a way to close the android keyboard when I'm on the last input of a form, already filled it, and click on the keyboard 'enter' button? It's a web app built with angularjs. Thanks
After the 'enter' button you could focus on an element (an <a> for example) and this should hide the soft keyboard.
Details to catch the enter button here: angularjs move focus to next control on enter
Related
We have a form which has a mandatory HTML text-area and a button which posts the form.
When user click the button with empty text-area, we show a popup that the text-area field is required and the popup has a close button on it, when a user clicks close button, we put the focus back on text-area. In this case, the keypad opens up in IPhone but the user is not able to enter anything in the field.
If the user click outside the text-area field and then again clicks on the field, then user is able to enter text in the field.
Same thing works in android device but not working for IPhone.
Can anybody give me a suggestion of what to look for or how to handle this?
We are using the focus() method to set the focus on text-area.
In one of my webapp page, I place a input and when I focus the input the soft keyboard pop.Then how can I know the user touch the 'enter' key?
event.keyCode should be used to know the input keyboard.
For android use KeyEvent.KEYCODE_ENTER to detect pressing enter
I have a page that is displayed in an UIWebView on an iPad app. The page has an input field, and when the user taps on it, the virtual keyboard popups up.
Currently, the keyboard has the blue 'Go' button. I would like to change the button text from 'Go' to 'Done' and I want to grey-out/disable the button until the user types in at least 1 char.
Is this possible with Javascript/jQuery mobile? I don't have access to the app.
Thanks.
I don't think this is possible. Bu you can change some functionality of the keyboard in html.
Make the button submit your form
Make another keyboard displayed
More features should not be available without access to the app. Instead of greying out the button, you can validate the form before submitting it with jQuery.
We have a shopping cart form which has 3 submit buttons (one to update the quantity, one to enter a promo code, and one to finish the checkout).
On desktop the user is expected to click the submit button next to the item they are affecting and this is generally what happens, the button is close to where their mouse/keyboard focus is and the visual association is strong.
On mobile it feels more natural to click the "go" or "submit" button provided by the mobile keyboard. This submits the form using the first submit button on the page rather than the most appropriate one.
Can I change what happens when a mobile user clicks the go/submit button on their keyboard?
My knowledge here is very limited, but can't you use the onsubmit callback? - http://www.htmlgoodies.com/html5/tutorials/HTML5-Development-Form--Keyboard-Events-3885651.htm#fbid=NgeGkg0S2JD
Solved this by disabling the submit buttons and conditionally enabling them based on which form field has the focus (only tested on iPhone so far).
On iPhone anyway the keyboard's go button submits using the first enabled submit button it finds. If there are no enabled buttons the button does nothing (wish it was removed if there is no enabled submit button but this is not the case).
I´ve got a form with an input field and a submit button. Nothing fancy here...
On the iPhone (iPhone 4S, iOS 5.1) i use the virtual keyboard to fill the input field and when i click/tap on the Go Button of the keyboard the form is submitted. But the virtual keyboard don´t hide after the submit.
If i use the submit button of the form the keyboard disappear. This problem exist only when i click the Go Button of the keyboard
Are there any javascript events i should check? Or do you have a hint for me?
Btw: In other forms with the same structure this problem do not exist.
Thanks in Advance
Use this code in click event to dismiss virtual keyboard
document.activeElement.blur();