Reputation: 2551
I am trying to focus another input element on one input`s blur event. But its not working.
<input type="text"/>
<input type="text"/>
$("input:last").on("blur",function(e){
$("input:first").focus();
})
the cursor is not present in the element. So i am not able to type anything.
Upvotes: 1
Views: 622
Reputation: 21
In my case worked on Firefox desktop. But didn't work in Firefox mobile.
Upvotes: 0
Reputation: 2356
Unfortunately you can't make it work for FF. See this jQuery
bug ticket FIREFOX FOCUS AND BLUR EVENTS NOT FIRING WHEN CALLING FOCUS() AND BLUR() and FireFox
one Bug 53579 - calling this.blur() in onfocus handler or this.focus() in an onblur handler do not work
Upvotes: 2