My goal is to open an input
element in a popup and focus that input.
So logically, I have tried $('#input').focus()
, $('#input').first().focus()
, and $('#input')[0].focus()
, but they do not work; but when I change tab and come back to my tab the input
element is in focus. Has anybody seen something similar? Or know how to explain this, or even better, know how to fix this...
P.S. For comments: yes, it is the only input with id "input" on my page, and yes I have an input
element with id "input" on my page, and yes, code for focusing elements is called after the input
has been added to the dom.