}
// custom parent method
, parent: function() {
- if(!this.node.parentNode || this.node.parentNode.nodeName == '#document') return null
+ if(!this.node.parentNode || this.node.parentNode.nodeName == '#document' || this.node.parentNode.nodeName == '#document-fragment') return null
return this.node.parentNode
}
// Fix for possible sub-pixel offset. See:
// 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)
}
}