I’ve been some testing reserching for this other question, when I noticed something very peculiar. FF4/5 fail to fire the focus jQuery event. The other question which might be considered a duplicate was closed and accepted without a real answer.
For the question itself, I tried the following simple bit of code:
$('#target').focusout(function() {
$(this).focus();
});
It works well in Chrome and in IE, but it fails on FF. Here’s the jsFiddle for the lazy ones among us.
Can anyone explain this behavior? Or is it a known bug?
I think I ran into this before, and if I recall correctly it seemed to be some kind of reentrancy problem. My impression was that because FF is already in the process of transitioning focus, it won’t let you initiate another focus transition. I believe my workaround was something like