IE9 focus fails unless an extra line is added. Is this an IE9 bug or a jQuery bug?

IE9 focus fails unless an extra line is added. Is this an IE9 bug or a jQuery bug?

I have a column of input fields that I validate for numbers only. If it's a NaN I want to display a message and refocus when the user tries to click away.

The following code will fail in IE9 to refocus back to the offending value. But I had to insert (by pure accident) an extra random focus line to force it to focus correctly. Any ideas? 
  1. <input type='text' class='unit' value=""/>

  2. $("input[class=unit]").change(function(){
  3. if ( !isInt($(this).val()) || Number($(this).val())<0 ) {
  4. alert("Not an integer  "+$(this).val());
  5. var oldUnits=$(this).data('oldUnits');
  6. $(this).val(oldUnits);

  7. $('#unit1').focus(); // fix for IE9 not focusing
  8. $(this).focus();
  9. return false;
  10. }
  11. });