I have a div that has been given a tabindex, when the div is focused(click or tabbed to) it does the following:
inserts an input into itself, gives the input focus>
Although I couldn't find this specifically stated anywhere, .focus()
only works on input elements and links. It also isn't supported properly in Chrome and Safari. I posted a demo here to show you what I mean. Also note that focus()
and focusin()
(v1.4) have the same results.
So that being determined, try changing your function to .click()
$("#recipientsDiv").click(function(e){ ... })