1

I am trying to have focus on input element using

$('#barcodeScanner').focus();

where barcodeScanner is a input textbox, but it opens up keyboard to enter input. I am trying to hide the keyboard using

    Keyboard.hide();

It's not working in the code. Can anyone help me hide the keyboard any other way?

Heretic Monkey
  • 10,498
  • 6
  • 45
  • 102
Vr1010101
  • 49
  • 8

1 Answers1

1

It is not working because you have focused on a text field, by default text field will open the keyboard. You can handle it in several ways.

First don't focus on a text input and focus on a div or any other element, and there should be a event on that div or that other element, when CHAR(13) or carriage return is read from the barcode it should put it that value in a hidden input to submit the form. I am guess that you already know how form works.

2nd way, make the text disabled and do the same process as first one it should work , this case you don't need hidden input.

3rd way, you can also hide the text input with display:none which should also fix the problem.

4th, do a blur after the focus and handle the scenario.

Let me know if any works.

Random Identity
  • 295
  • 2
  • 11