From b1c3cfa7626cee81af0fba7f16a5fdb76479c349 Mon Sep 17 00:00:00 2001 From: Kuzminov Aleksandr Sergeevich Date: Sun, 30 Nov 2014 14:25:39 +0300 Subject: [PATCH] #10259 fix ng-mouseenter in IE9-11 --- src/jqLite.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/jqLite.js b/src/jqLite.js index d3894fea7c03..d830375ad831 100644 --- a/src/jqLite.js +++ b/src/jqLite.js @@ -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 @@ -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); } });