From 5fedccf46e545940213fcbadd870e461d61a29af Mon Sep 17 00:00:00 2001 From: Norbert Bartos Date: Tue, 13 Nov 2018 14:17:09 +0100 Subject: Add node document-fragment type check --- src/element.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/element.js') diff --git a/src/element.js b/src/element.js index 35b487b..e2f9c47 100644 --- a/src/element.js +++ b/src/element.js @@ -178,7 +178,7 @@ SVG.Element = SVG.invent({ // loop trough ancestors if type is given while(parent && parent.node instanceof window.SVGElement){ if(typeof type === 'string' ? parent.matches(type) : parent instanceof type) return parent - if(!parent.node.parentNode || parent.node.parentNode.nodeName == '#document') return null // #759, #720 + if(!parent.node.parentNode || parent.node.parentNode.nodeName == '#document' || parent.node.parentNode.nodeName == '#document-fragment') return null // #759, #720 parent = SVG.adopt(parent.node.parentNode) } } -- cgit v1.2.3