-
Notifications
You must be signed in to change notification settings - Fork 2k
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
scopeSubtree doesn't work on SVG elements #2407
Comments
Is there by chance a rough ETA on when this might get fixed? Team lead will be asking for details in our next meeting, hoping to have something I can give them. Thanks! |
Ping? still looking for any feedback here... |
@sorvell @kevinpschaaf @sjmiles It seems like |
Is there a simple test case that I could include for the patch I'm writing? |
A simple D3 chart inside an element would suffice, that is how I came across this problem. I can see about creating a demo if you aren't able to. |
Fixes #2407 add test with dynamic svg elements
Fixes #2407 add test with dynamic svg elements Test for fill-opacity, it doesn't get munged like color Most browsers don't like CSS for sizing the circle :(
retcon'ing bug title so it'll make more sense in the release notes. Because yes, I care. |
It appears that there are 2 code paths happening for style scoping... one here: https://github.com/Polymer/polymer/blob/master/src/standard/styling.html#L122 which does not treat SVG consistently due to the possibility that SVG elements can sometimes have .className == an SVGAnimatedString object... this will cause scopeSubtree to "skip" them since className = "new string" will just fail silently.
It seems the fix for #1490 should be expanded to be more generic to encompass all cases where styling my cross path with SVG elements.
Huge thanks to @arthurevans for helping track down why some SVG elements worked and others did not and still some did only under certain conditions.
Tagging @sorvell since the related fixes were primarily his work.
The text was updated successfully, but these errors were encountered: