Some Guy Named Dylan  

Autoclosing Select Element in IE 7

My tales of wrestling a misbehaving auto closing select element in IE 7. Not for the faint of heart :)

I just spent 8 hours with an odd quirk in IE 7 that caused a select element to misbehave badly. The element would just auto close on its own randomly for no reason.

This led to nothing short of a terrible and poor user experience.

The conditions were the following:

  • Server side generated page accessed through SSL.

    Saving the source into an html page and accessing through http or https led to no reproduction of the bug.

    Accessing the .aspx page though did lead to reproduction of the bug and myself and several members of our QA team were able to repro the issue.

  • Standard Doctype of HTML 4
  • select element had 11 pixel font and a font family of Arial inherited through a css cascade.
  • Setting the font family explicitly to Tahoma or Verdana alleviated the issue. That's the fix, but I don't know why.
  • I'd explore more but it's hard to tell my boss I spent a day fixing a select element when I have more bugs to crush.
© Dylan Oudyk 2007-2012