Skip to content

Commit b1c3cfa

Browse files
author
Kuzminov Aleksandr Sergeevich
committed
angular#10259 fix ng-mouseenter in IE9-11
1 parent 09fa9df commit b1c3cfa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/jqLite.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -784,8 +784,8 @@ forEach({
784784
handle = expandoStore.handle = createEventHandler(element, events);
785785
}
786786

787-
var contains = Node.prototype.contains || function (node, arg) {
788-
return !!(node.compareDocumentPosition(arg) & 16);
787+
var contains = Node.prototype.contains || function (arg) {
788+
return !!(this.compareDocumentPosition(arg) & 16);
789789
};
790790

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

0 commit comments

Comments
 (0)