I am trying to get the cursor to return to the previous input when the value is incorrect. Here is a simpler version of the script I'm using:
$('input:first-child').blur(function(e){ console.log('here'); $('input:first-child').focus(); });
It works when I click on another element for focus, but not when I click on the body or another div element. What for? I have a jsfiddle case: http://jsfiddle.net/leyou/Zabn4/37/
Edit: I tested Chrome / Win7, but it seems worse with Firefox. It completely ignores focus ()
leyou source share