aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIgor Minar2011-03-31 01:17:34 -0700
committerIgor Minar2011-03-31 01:17:34 -0700
commit56c00800c78d3d896fa6cb97ab97b974805152c4 (patch)
tree9eea63f150ad3b67527c6ae3805883912c4ba1ac /src
parent15ec78f5eff3f8fa74714fe10986be094915c800 (diff)
downloadangular.js-56c00800c78d3d896fa6cb97ab97b974805152c4.tar.bz2
fix jqLite#parent to be compatible with jQuery
our original implementation doesn't work with document fragments on IE - tests were added to cover missing cases
Diffstat (limited to 'src')
-rw-r--r--src/jqLite.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jqLite.js b/src/jqLite.js
index 78fc1655..d16ce19e 100644
--- a/src/jqLite.js
+++ b/src/jqLite.js
@@ -371,8 +371,8 @@ forEach({
},
parent: function(element) {
- // in IE it returns undefined, but we need differentiate it from functions which have no return
- return element.parentNode || null;
+ var parent = element.parentNode;
+ return parent && parent.nodeType !== 11 ? parent : null;
},
next: function(element) {