Is there a way to determine if a given drop down is currently active and displaying it’s list of options?
I am currently binding to the mousedown event of the dropdown and populating the options when the user clicks on it. Unfortunately the mousedown event fires when the user selects the option as well.
If I can determine if the drop down is already displaying it’s options, then I can skip populating the options.
This will tell you if the select element has options in it
In javascript
In JQuery
Edited:
OK instead of using the mousedown event try using the focus event on the select element. This will also ensure that you populate the control properly when a user uses tab to get to the select element.