I'm trying to auto-tab text fields whenever a key is pressed (so only one letter goes in each input).
I've attached the following to the keyup
event on the inputs:
var next = $(e.target).next();
while(next.length && !next.is('input')) next = next.next();
next.focus();
In a browser this looks for the next input (or the end of the form) and moves to focus to it. Works perfectly.
On an iOS device, though, it looks like it's working in the sense that the next
input gets all focus styling, but the keyboard goes away and you have to touch an input to get it back.
How do I get around this?
edit: in response to the negative feedback to auto-tabbing. Let me rephrase the question:
I'm building a very simple, iPad specific, trivia game for a client. Answer the question, hit next, answer the question, hit next, type of thing. We have a number of question formats: multiple choice, scrabble style rearrange the letters, and... a "Wheel of Fortune"-ish fill in the word question.
I'm doing this by having n inputs representing the letters in the word, and having to tab (hit next on an iPad) each letter is a pain.
How might I go about build this question format for iPad?