9
Views
1
Comments
Solved
Move cursor from one input to other.(For Mobile App)

Hi, I have 4 text boxes, which will take one single character as input each. Once I type in the character, I want the cursor to move to the next inputbox.(For a mobile app)

I used the following javascript onkeypress .

"document.getElementById($parameters.WidgetId).focus();" 

It works correctly on the emulator(On the browser), but when I try it on my mobile phone, it doesn't move the cursor to the next input.

Why does this not happen on my mobile phone? How can I correct this?

Rank: #1811
Solution

I solved this by changing the action from "onkeypress" to "OnChange".

And if there is already a character present in the input, then I don't run the javascript. 

Something like this:

Screenshot20210110121144.png