Skip to content

Commit

Permalink
angular#10259 fix ng-mouseenter in IE9-11
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuzminov Aleksandr Sergeevich committed Nov 30, 2014
1 parent 09fa9df commit b1c3cfa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/jqLite.js
Original file line number Diff line number Diff line change
Expand Up @@ -784,8 +784,8 @@ forEach({
handle = expandoStore.handle = createEventHandler(element, events);
}

var contains = Node.prototype.contains || function (node, arg) {
return !!(node.compareDocumentPosition(arg) & 16);
var contains = Node.prototype.contains || function (arg) {
return !!(this.compareDocumentPosition(arg) & 16);
};

// http://jsperf.com/string-indexof-vs-split
Expand All @@ -808,7 +808,7 @@ forEach({
var target = this, related = event.relatedTarget;
// For mousenter/leave call the handler if related is outside the target.
// NB: No relatedTarget if the mouse left/entered the browser window
if (!related || (related !== target && !contains(target, related))) {
if (!related || (related !== target && !contains.call(target, related))) {
handle(event, type);
}
});
Expand Down

0 comments on commit b1c3cfa

Please sign in to comment.