Keyboard is not opening automatically on iPhone - javascript

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?

Related

How to focus input field by default in Webview in flutter without any user interaction

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).

Is it possible to hide the soft keyboard in android and still retain focus?

I'm programatically focusing a input text element upon clicking a button.
But in android devices it soft keyboard is popping out on focusing the input element.
Is it possible to hide the soft keyboard in android and still retain focus with JavaScript as I'm inputing the data via scanning bar code and not via soft keyboard?

UIWebView - change virtual keyboard 'Go' button text?

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.

How can we open iPhone/android native keyboard using phonegap or javascript

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.

Javascript / jQuery Windows 8 On-Screen Keyboard

I'm trying to build an application where if the user activates a page, a focus event will occur and focus into a text field. I was half-heartedly expecting that when I called .focus() on in the input box, Windows 8 would pop-up the on-screen keyboard. This in not the case.
Does anyone know of a way to get the Windows 8 on-screen keyboard to come up when the text field is focused via javascript.
If the user "taps" into the textfield, the focus event does fire and the keyboard comes up.
I've tried binding to touchstart, 'touchend, click and focus, but all of these do not seem to activate the on-screen keyboard.
This application will run strictly on Windows 8, so there is no need to make it so that other platforms that do not have built-in on-screen keyboards work properly.
You can't. Only user actions can open the on-screen keyboard. This is by design. See here.

Categories