New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
_belongsTo error due to element being null #274
Comments
It's a little odd...looking into it some more, it seems to ascend the DOM tree until it gets to the document, but the test :
fails. If I test
and
They both seem to be 'document' in some form, but :
I am concluding that shadow-dom isn't an issue in this problem. Max. |
FWIW, this seems to fix the problem :
Do you see any problem with making that change? |
Yeah you are totally right... there needs to be a check at the top of if (element === null) {
return false;
} Feel free to send a pull request or I will try to get this out later tonight |
Return false if element is null to handle webcomponentsjs polyfill.
I hope that PR is as you intended...I checked against document too, since that'll happen one iteration sooner, iinm. |
Any hope of getting this fix in and released soon? I have a PR on my own s/w that is waiting on it, so it'd be great to get #275 merged. |
FYI, we'll be switching to using my fork so we can continue to move forward (and I don't keep having to rebase my branch) - the power of open source :) |
Okay. Yes, I will try to get it released within the next couple days, but good that you are not held up on it. |
This is affecting us too! Would love to see #275 merged– it looks good. |
Hi,
I'm developing some features on an app, and I have them working on Chrome, but now I am testing on Firefox I am getting an error.
The issue seems to be in the _belongsTo() function which is recursive. After several iterations, it calls itself with the element parameter as null - ie element.parentNode is null.
I've not figured out what is wrong, but I am suspecting it is something to do with the webcomponents implementation of shadow-dom - or lack thereof - that is certainly one significant difference between chrome and firefox, and since thie _belongsTo() function seems to be ascending the DOM tree, then perhaps it is related.
It'd be great to get some opinion of how this problem can be worked-around.
In the meantime, I'll see if I can reduce my code into a simple test case.
Thanks,
Max.
webcomponentsjs#0.5.2
mousetrap#1.5.2
polymer#0.5.5
stack trace :
The text was updated successfully, but these errors were encountered: