0

I've been trying to find my way out of the dead end that apple created by stripping down autofocus on iOS. I get it, it creates problems for some cases.

However, I'm still trying to find a proper way to focus an item without clicking the item itself.

I've tried auto-focusing;

myInput.on('blur', function () {
    setTimeout(function () {
        myInput.focus();
    }, 0);
});

I've tried focusing on document-click (anywhere in the document);

document.body.onclick = function () {
    s.focus();
};

Both solutions didn't work. Therefore, I'm needing a way to focus the field/input automatically (on page load) or by clicking anywhere on the page (instead of limiting the click to only one item).

I have a single input field that has to be filled in my case. So I don't mind having a lock on that input field (that's actually what I would prefer!).

Any ideas?

Mia
  • 6,220
  • 12
  • 47
  • 81

0 Answers0