Right, so I'm having some issues with focusing on elements on mobile browsers. Desktop works fine. I've tried click and focus but neither are working so I'm thinking it's maybe something to do with the way I'm identifying it. I know it's a little convoluted and messy but if there's a way to emulate a tab key press this would also work.
Effectively I have 5 inputs and when a single key press is detected in one, I want to move the user to the next one. The way the html is structured though means they are not siblings. I had them as siblings before and choosing nextSibling was working.
Any help appreciated. TIA
{
x = document.activeElement.id
setTimeout(function () {
document.getElementById("input" + (parseInt(x.toString().charAt(x.toString().length - 1)) + 1).toString()).focus()
document.getElementById("input" + (parseInt(x.toString().charAt(x.toString().length - 1)) + 1).toString()).click()
}, 10);
}