-
Notifications
You must be signed in to change notification settings - Fork 3.4k
md-colors is broken with default theme in dialog #10276
Comments
It's definitely broken since Angular-Mateiral v1.1.3. Adding the term Example: |
Excellent. very good |
If it can help to debug, I added a breakpoint here: function applyThemeColors(element, colorExpression) {
try {
if (colorExpression) {
// Assign the calculate RGBA color values directly as inline CSS
element.css(interpolateColors(colorExpression));
}
} catch (e) {
$log.error(e.message);
}
} colorExpression = |
I actually figured out how this can be fixed, I'm looking into making a PR now |
Assert that md-dialog-container will not be given an md-theme attribute if the child it is propagated from does not contain a theme itself. Issue: angular#10276
Assert that md-dialog-container will be given the md-theme attribute of the child it is propogated from given that it has an md-theme. Issue: angular#10276
Only append an md-theme attribute if the md-dialog is propagated from an element that contains an md-theme. Issue: angular#10276
I made a PR #11078 For anyone looking for a workaround to this issue, if you set the md-theme property inside of your dialog content to either default or the specific theme you want to use, this will stop md-colors from breaking. |
Updated CodePen for 1.1.7. Issue still occurs. |
Only append an md-theme attribute if the md-dialog is propagated from an element that contains an md-theme. Fixes angular#10276
Same issue. Related issue: #525 |
The PR to fix this is going through the presubmit process (there was unfortunately a delay in that process) and then hopefully it will pass and be able to be merged. |
@Splaktar Is this issue resolved yet? I am facing it when dynamic theme is generated. |
@akvaliya This was fixed in 1.1.8 |
I just ran into this with AngularJS 1.6.4. |
@garretwilson which version of AngularJS Material are you using? |
@garretwilson this is fixed in 1.1.8. Here's the CodePen above updated for 1.1.8 that shows this working without the need to add |
Ah, I'm using 1.1.3. Thanks for the info; we'll update in our next iteration. |
Yep, v1.1.8 seems to have fixed it, thanks. |
Only append an md-theme attribute if the md-dialog is propagated from an element that contains an md-theme. Fixes angular#10276
Only append an md-theme attribute if the md-dialog is propagated from an element that contains an md-theme. Fixes #10276
Uh oh!
There was an error while loading. Please reload this page.
Actual Behavior:
What is the issue? *
using md-colors with default theme inside dialog throws this in 1.1.3:
mdColors: couldn't find '' in the palettes.
What is the expected behavior?
the default color palette should be applied with warning color.
CodePen (or steps to reproduce the issue): *
CodePen
Angular Versions: *
Angular Version:
1.3.20, 1.5.8, 1.5.11Angular Material Version:
release: version 1.1.3Additional Information:
Browser Type: *
ChromiumBrowser Version: *
55.0.2883.87OS: *
Ubuntu 16.10Stack Traces:
mdColors: couldn't find '' in the palettes.
The text was updated successfully, but these errors were encountered: