0

There is an Android tablet with a barcode scanner connected via USB.
This tablet shows an intranet web site.

Because the Android OS detects an input device, it stops displaying the soft keyboard when focus goes into a field on the screen.

Most of the time this is fine, but there is a couple of fields for which the keyboard must be displayed.
Is there a way to trigger the soft keyboard with JavaScript or in some declarative way from an HTML page?

It is currently not an option to create a wrapper Android app that would display the web site in a WebView and trigger the keyboard via the javascript interface. This is because the WebView uses the stock Android browser, which does not support all features the web site has (the Android version is not too recent). So the tablet runs a separately installed Firefox (or Chrome, no preference).

GSerg
  • 76,472
  • 17
  • 159
  • 346

1 Answers1

0

Try using

onclick="javascript:document.getElementById('input_field_to_focus').focus();"

Refer the link:http://code.google.com/p/android/issues/detail?id=27438

Shruti
  • 43
  • 8