Hi All,
I have an eventlistener added on the OnReady. But it only starts listening when you interacted with the screen (scroll or press somewhere on the screen). If you open the app and don't do anything it's not working. The phone has a hardware button to do an enter. And this is what I try to catch.
Someone already had this issue and has a solution for it?
Hi,
Can you share the Javascript code in the onReady event?
Regards,
Daniel
Hi Daniel,
Sure, here it is:
document.addEventListener("keypress", function _listener(e) { if(document.querySelector(".Input_barcode") !== null){
if(e.key == "Enter"){ input.value = ""; input.readOnly = true; input.focus(); setTimeout(function(){ document.querySelector(".Input_barcode").readOnly = false; }); $parameters.Key = e.key; $actions.BarcodeChange(); e.preventDefault(); } }});
Best regards,Michiel