Does jQuery prevent this type of behavior?
$("input").focusout(function() {
$(this).focus();
});
This is how it's done (works cross-browser):
$('input').blur(function() {
var that = this;
setTimeout(function() { $(that).focus(); }, 0);
});
Live demo: http://jsfiddle.net/jzt2Z/1/
1) Actually it works in Chrome. Here is an example: http://jsfiddle.net/8WP53/
Once 1st input gets focuseout - it remains focused, and user cannot focus any other input
2) in IE I get an error "Stack overflow" (brand name StackOverflow.com error :) )
3) Strange, but in Firefox you can select any input, but no error is being produced
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With