File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -241,6 +241,14 @@ function jqLiteParseHTML(html, context) {
241
241
return [ ] ;
242
242
}
243
243
244
+
245
+ // IE9-11 has no method "contains" in SVG element and in Node.prototype. Bug #10259.
246
+ var jqLiteContains = Node . prototype . contains || function ( arg ) {
247
+ // jshint bitwise: false
248
+ return ! ! ( this . compareDocumentPosition ( arg ) & 16 ) ;
249
+ // jshint bitwise: true
250
+ } ;
251
+
244
252
/////////////////////////////////////////////
245
253
function JQLite ( element ) {
246
254
if ( element instanceof JQLite ) {
@@ -826,7 +834,7 @@ forEach({
826
834
var target = this , related = event . relatedTarget ;
827
835
// For mousenter/leave call the handler if related is outside the target.
828
836
// NB: No relatedTarget if the mouse left/entered the browser window
829
- if ( ! related || ( related !== target && ! target . contains ( related ) ) ) {
837
+ if ( ! related || ( related !== target && ! jqLiteContains . call ( target , related ) ) ) {
830
838
handle ( event , type ) ;
831
839
}
832
840
} ) ;
You can’t perform that action at this time.
0 commit comments