views:

63

answers:

1

I am pretty sure this is just a limitation of iE6, but I thought I better ask just incase:

<body>
    <h1>Select + event test</h1>
    <div>   
        <select>
            <option>ABC</option>
            <option>123</option>
        </select>
        <span id="eventSrc">Event Source</span>
    </div>
    <div id="log"></div>

    <script type="text/javascript">
        var log = $("#log");
        $("#eventSrc").bind("mouseover mouseout mouseenter mouseleave", function(event){
            log.append(event.type + "<br/>");
        })
    </script>
</body>

In all modern browsers, the log registers mouse* events, even when the select is "dropped down". In iE6, it doesn't seem to fire the events while active + dropped down.

Any solutions? My usecase is for tooltips that need to popup on mouseover, even when looking at the dropdown list..

Pure JS solutions also welcome, jQuery is just concise for my demo :)

+1  A: 

I think you are out of luck. IE has notoriously had issues with select lists.

e.g. you can't bind events to the options in a select list... or disable them (pre IE8) and trying to modify the contents (e.g. options) while it is open fails.

scunliffe