Here is a nice IE bug I just found.
When a <label> is attached to a <select> element, and the user clicks the label, the <select> is selected (which is nice), but its selectedIndex becomes 0 (that’s not so nice).
Here is an example page.
Update: I found out that this is an MSDN report bug. See http://support.microsoft.com/default.aspx?scid=kb;en-us;314279&Product=iep. They also suggest a workaround – use the onfocusin event to store the current selection before the focus is actually moved to the list, and reset it later. However, they say “you can only work around this problem in Internet Explorer 6” – I’m not sure why, as the onfocusin event is said to be supported on Internet Explorer 5.5 and later.
However, I would suggest a much simpler solution – simply handling the label event ourselves, without IE to interrupt and destroy. In their sample, I would use:
<LABEL for=”test” onclick=”document.getElementById(this.htmlFor).focus(); return false;”>Citizenship Status:</LABEL>
In my tests, it does the job perfectly well.