I’m getting some strange happenings on google chrome. With the following code I’m getting an infinite number of alerts.
<input type="text" />
$('input[type="text"]').live('focus', function(event) {
alert('in');
});
Firefox and IE8 are both fine.
Why is this happening in chrome?
I think, it’s because after you close the dialog (alert box), the focus returns on the textbox, therefore, the function will fire again.