-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Exception thrown when canvas is inside a tag #5826
Comments
@karaxuna can you please share a jsfiddle that reproduces your issue? |
This issue comes from #5585 which tests @reda-alaoui any idea how to fix that issue? @karaxuna as a workaround, you can wrap your canvas under a |
@simonbrunel maybe you could use this method to check if node is shadow root: |
Looks good indeed, would you be able to submit a PR which replaces |
@simonbrunel ok |
@simonbrunel modified it a little bit. |
@simonbrunel sorry for that :/ |
@reda-alaoui no worries :) did you try the fix, can you confirm it works in your case (I just approved the PR)? |
@simonbrunel It works: https://jsfiddle.net/p9gqy4vf/ |
@simonbrunel I can't test it right now. |
Ok, thank you guys (@karaxuna I can't open the jsfilddle). Just want a second review then we merge the PR. |
Expected Behavior
When target element for Chart is inside anchor tag, chart should render normally.
Current Behavior
Currently this method fails, because parent anchor tag has property
host
which is localhost:3000 in my case, so this method returns localhost:3000 instead of parent element.helpers._getParentNode = function(domNode) { var parent = domNode.parentNode; if (parent && parent.host) { parent = parent.host; } return parent; };
Context
Environment
The text was updated successfully, but these errors were encountered: