parentNode is undefined - IE/Firefox
Closed this issue · 4 comments
i traced it to
if (this.parentNode.nodeType == 11) { // DOCUMENT_FRAGMENT_NODE
target = ownerRoot.host;
} else {
target = this.parentNode;
}
should be
var parentNode = Polymer.dom(this.parentNode);
if (parentNode.nodeType == 11) { // DOCUMENT_FRAGMENT_NODE
target = ownerRoot.host;
} else {
target = parentNode;
}
...
Seeing this as well.
Should the above be var parentNode = Polymer.dom(this).parentNode;
, instead?
Making the changes outlined above, I start getting a couple of other various errors relating to either
- target being null
- target not supporting "addEventListener"
... which seems odd - I'm not sure if there's a third potential target here that would be more appropriate.
I wonder if the event bindings that occur in attached() need to be executed via async() to be more like the old "domReady" callback.
I encountered the same error on FF/IE:
TypeError: this.parentNode is null
Same stack trace.
Error generated stops other scripts running correctly, so it is quite annoying.
Also encountered: Firefox 41.0.2
paper-ripple.html.js:411:1
Doesn't happen if I set a breakpoint at the line.
Chris
This should be fixed by the re-factoring done in #63. Please re-open if you can still repro this with that code