IE breaks on the line 3047
if (!related || (related !== target && !target.contains(related))) {
SVG in IE has no "contains" method
example http://jsfiddle.net/4pe5pyn3/
Angular version - 1.3.4
I know is more of a hack but until this gets permanently fixed I added a small shim.
if (typeof SVGElement.prototype.contains == 'undefined') {
SVGElement.prototype.contains = HTMLDivElement.prototype.contains;
}
It does the job and doesn't require any core (jqLite) modification.
@ionut-ai Thx for this fix ! It works for me (ng-show buggy on svg element in IE10).
@ionut-ai Where does one put the shim?
I've just spent all morning _(2+ hours)_ investigating the issue.
I'm working in a secure corporate environment with many security policies / restrictions.
On IE11 window.Node is undefined on files loaded from the local file system.
It works on localhost it works on plnkr but when using file protocol it fails...
It took me a while to figure out.
@ionut-ai @Pryscy i am still confused.. do i need to replace the buggy code
var jqLiteContains = window.Node.prototype.contains || /** @this */ function(arg) {
// eslint-disable-next-line no-bitwise
return !!(this.compareDocumentPosition(arg) & 16);
};
with if (typeof SVGElement.prototype.contains == 'undefined') {
SVGElement.prototype.contains = HTMLDivElement.prototype.contains;
}
or do it need to place it somewhere
Most helpful comment
I know is more of a hack but until this gets permanently fixed I added a small shim.
It does the job and doesn't require any core (jqLite) modification.