-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix CSP error in MdProgressSpinner #1850
Conversation
Hey, thanks for PR! Does this work for all latest browsers? |
Yes, it does. I've tested in Chrome 67, Firefox 61, Edge 17, and Opera 54. I haven't tested in Firefox before, the latest commit fixes some issues. |
|
||
MdProgressSpinner.diameters.add(this.mdDiameter) | ||
attachCircleStyle () { | ||
const circle = this.$el.getElementsByClassName('md-progress-spinner-circle')[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be this changed to $refs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree
* origin: (55 commits) fix(MdSvgLoader): svg loader for invalid / missing mimetype (#1942) docs(Icon): fix minor typo (#1973) fix(MdRouterLink): new router-link registration name (#1978) chore: apply discord vanity URL (#1927) docs(ROADMAP.md): replace dead slack invite link with discord invite link (#1924) docs(Table): fix grammar issues (#1902) feat: router link components improvements (#1651) fix(MdTable): recalculate fixed header width on data changes (#1877) fix(MdDialogContent): missing theme class (#1876) docs(Elevation and Layout): Typos fixed and improved documentation. (#1878) fix(MdTable): nextTick selection data (#1874) docs(BottomBar): fix typo (#1875) docs(MdButton): escape a tag (#1872) docs(Input): typos and correction chore: upgrade dependencies fix(MdField): remove firefox required box-shadow feat: disable complexity rules for some methods fix(MdProgressSpinner): fix CSP error (#1850) fix: MdBadge do not accept color #1854 issue (#1856) fix: fix the repeated generated css theme classes if there is multiple themes defined (#1784) ...
The current release injects a
<style>
tag into the page with the animation CSS for the spinner. In pages that have a restrictive CSP (i.e., without'unsafe-inline'
) an error is shown in the DevTools console and the spinner becomes a solid ring.This PR removes the style injection by using CSS variables instead.