I have an input box which i have camouflaged in the background. Basically, i am developing an app for Honeywell CT50 device, which uses laser scanning for scanning barcodes and qrcodes. Since, laser scanner requires an input box to contain the value of barcode, once scanned, being the default behavior of focused input box, keypad appears on the mobile screen. I don't want the keypad to appear as the value is being read by scanner. I am developing the application using angular 6. Due to the keypad popping up from bottom of the screen, i am also facing some issues regarding vertical scrolls.
I have tried hiding the keyboard using :
<input #barcodeInput onfocus='blur()'>
The above doesn't work.
Then i tried the following:
@ViewChild('barcodeInput') barcodeInput: ElementRef;
this.barcodeInput.nativeElement.dismissSoftInput();
The above doesn't work as well.
I am stuck and can't proceed. I have to hide the keypad when i load a particular component, keep focus on the hidden input box so that laser scanner works without any click and then clear the value of hidden text box once the value is processed.
Please suggest me a solution!