简体   繁体   中英

mouseenter, mouseleave in Firefox

I'm facing a strange issue in Firefox 16.

In a div I'm fading in on a mouseenter (and fade out on mouseleave ) event there is a select Tag embedded. When I move the mouse over the options the div fades out and in and so on. But there is no chance to select a option.

This does not happen in Chrome. Has anyone an idea why this is happening and how to fix it?

Fiddle: http://jsfiddle.net/sCmnd/2/

Try that: http://jsfiddle.net/sCmnd/3/ . I tested it on Firefox and it worked.

mouseleave:function(evt) {
    if (evt.target.nodeName.toLowerCase() !== "select") {
        $('div.fade').fadeOut();
    }
}

For some reason mouseleave triggers on select element, but this doesn't allow fadeout when mouseleave is triggered by select element.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM