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.
Related
I am using flutter_inappwebview to open webview in flutter app.
My use case is, I want to open keyboard as soon as user enters in the webview. The page that I am loading in webview already has a focused input field but the keyboard does not open automatically.
I have to tap on the input field (in the page) in order to open the keyboard. If I load the same page on web-browser, it works fine and shows focused (with cursor) input field.
Some observation that I had - If I interact with web-view and come back to that page, keyboard opens up automatically. So it seems, we have to do some user interaction (real, not programatically) in order to focus element in page.
How to focus by default the webview to let me programmatically set the focus on a specific webview input? Or Is there any thing that can be done in web-page to open keyboard? Thanks in advance.
I have tried everything in web-page to open the keyboard like adding focus only when page is fully loaded. This was done in web-page, not from flutter side. But it does not open the keyboard, just leaves the input field in focused state (but cursor does not appear).
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 login page that contains the usual email and password fields, as well as a log in button. For usability, the autofocus HTML5 attribute has been used on the email field.
When loading the page on iOS, you can tell by the green border that the field has the focus, but because of iOS limitations, the focus is not fully applied to the field, as you can see here with the keyboard not being displayed:
The first thing the user does is touches the email field, but as far as iOS is concerned, you're clicking on a different part of the page. The focus is actually given to the password field instead, because the page shifts upwards to make way for the keyboard that did not display previously:
In a similar behaviour, if the user touches on the password after page load, the log in button is clicked instead and validation errors appear.
Is there any way to solve this?
Why not disable the autofocus when you show the page on iOS?
It would be very annoying when user enter a website and the keyboard pops up without any actions on the page.
I even can't think of any website popping up the keyboard on the load.
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).
In my Phonegap application i need one div which is scrollable, When user click on it device keyboard should be open and text should be writeable in div. But i dont know how to open device native keyboard for both device. Is there any plugin available for this functionality.
Have a hidden input field, and onclick event of that div, simply call focus() for that input field. It'll automatically bring up the keyboard. And then you can read the content of the input field and write that into the div.