mootools/mootools-core — Issue #2221: Element.Events.mouseleave in IE7
Author: ibolmo
Created: 2012-01-19 08:19:06+00:00
State: open
Labels: bug

(from [Lighthouse](https://mootools.lighthouseapp.com/projects/2706/tickets/603-fix-check-for-ie7))

There is an issue when using onmouseleave events in IE. If the element has a child SELECT element, when opening this select in IE, if the mouse leaves the element but stays inside the SELECT dropdown (further down for example), the mouseleave event fires even though the mouse is still inside the element.

The problem does not occur on Firefox.

``` javascript
var $check = function(event){
var related = event.relatedTarget;
if (related == undefined) return false; // was 'return true'
if (related === false) return false;
return ($type(this) != 'document' && related != this && related.prefix != 'xul' && !this.hasChild(related));
};
```