views:

11

answers:

1

For whatever reason, SOMETHING is preventing an input text box's focus event from firing when clicking into the box, ONLY in IE 6, in our jQuery site. (Tabbing to the box actually does fire focus).

Any suggestions on how to debug this?

I have no idea what's happening.

I've removed all the events from the input box except the focus and that doesn't help. I don't see any events that stop propagation that would get in the way (besides, why would they just get in the way for IE?).

I've added an $(inputbox).bind("focus", function() { alert("focussed!") }); and that never fires when you click into the box; only when you tab into it.

A: 

first, ensure that the inputbox object is not null, and it has length >= 0:

if (inputbox && jQuery(inputbox).length > 0) {
 bind here
}

what might not be happening is inputbox may not be assigned to a variable - it might be null. jQUery won't throw an Exception for that.

Also, if you have any DIVs or anything else near this inputbox, that you don't capture the focus event in it and then prevent bubbling.

Anatoly G