I have noticed that in an Android Cordova project anything with <input type="number"> includes a "next" button on the keyboard. This next button allows you to focus on the next input field when pressed. The same is not true for a <input type="text">. In this case there is only a 'go' button and it does not do anything. How can I set focus to the next input field when inside a input text field? Thanks!
I am using Android Kit Kat with Cordova 3.3
UPDATE: I have found that it is possible to make the "next" button appear in Android by setting the android:imeOption inside of <EditText android:imeOptions="actionNext"> </EditText>. Is there a way to set that option in cordova?
Related
I'm using React-Simple-Chatbot (https://github.com/LucasBassetti/react-simple-chatbot) for a web based chatbot. When a user input is prompted, the input field is focused. On Android this works well and opens the keyboard. On iPhone, it does not open the keyboard automatically, the user has to click the input field, then it opens.
The input field is from the styled-components library. I forked the project, to not only focus but also click the input field.
chatbot.input.focus();
chatbot.input.click();
How can I use Javascript to open the keyboard on iPhone Safari?
I'm trying to get access to the mobile keyboard in a cordova app so that while the user is signing up, they can just jump to the next input on the keyboard. For example, on iOS native apps, you have access to change the "return" button to "next" or "go."
I've looked at the Ionic-plugin-keyboard but as far as I can see it doesn't allow you to do what I'm trying to do. Is there a way I can change those buttons with js/is there another plugin I can do that with?
Here are some potential resources for keyboard control:
link 1
link 2
link 3
In summary: On most devices it show a "next" button when adding the attribute tabindex to each input, incrementing in order. Otherwise it is generally suggested to set an input as the browser's default focus, or to detect when the user clicks "ok" and move the focus after that event (key code for "ok"/"enter" is 13).
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.
I am making a mobile HTML page that has an input field. When I tap the inside of the input field, the iOS 7 keyboard appears. But the keyboard has a top ribbon that contains "<", ">", and "Done" buttons, as this
How to get rid of this top ribbon on keyboard? I want to keyboard style same as for safari address bar input and the iOS7 "Messages" app. Thanks!
its not possible due to the way iOS is designed,maybe in the future but for now we are stuck with this keyboard
As of iOS 9.3 this is not possible. (Unlike android) iOS is not open source so it's hard to prove but It's likely intentional because there is no other safe way to exit the keyboard. (Unlike android which has a back/close-keyboard button on swipe up or physically depending on the device).
The following is a list of border cases that one might expect to hide the done bar if it were possible to do so;
<span contenteditable="true"
<input tabindex="-1"
<input type="search"
only one input tag on the page
no form tag
The Android browser crashes in a very simple scenario (I am testing on Galaxy S3, Android 4.1.2):
I have a page with a text input and a file input (you can test it here http://jsbin.com/agugit/1/)
<input type="text" name="test"/>
<br />
<br />
file<input type="file" />
If you focus the text field first, and then hit the 'next' key from the keyboard, the native file picker pops up.
Pick a file, or take a picture, and the next thing that happens is the browser freezing.
If instead you are focusing the file input dirrectly (by tapping, not by using 'next'), everything works just fine.
I have tried different workarounds but none found.
Any help or ideas?
The only solution I have found on Android is to make every file input disabled by default (so that it is skipped from tab order navigation) and listen the 'tap' event, so that when tap occurs, I focus the field programatically, so that the file picker pops up.
After the focus, and a delay of say 500 ms, make the field disabled again.
Any other ideas are still welcomed.