You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Repro is trivial: Just try to queue up a velocity animation to change the background-color to #000. It will fail. However, passing in backgroundColor succeeds.
Most of the code is set up to allow animating both background-color and backgroundColor but a small section of code in the start handler is missing this normalization code. This causes the code to fail to append the Red, Green and Blue styles. This cascades as a problem in Css.Values.getUnitType which now defaults to px because it fails the following regex below:
getUnitType: function (property) {
if (/^(rotate|skew)/i.test(property)) {
return "deg";
} else if (/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(property)) {
/* The above properties are unitless. */
return "";
} else {
/* Default to px for all other properties. */
return "px";
}
},
The fix is to add CSS.Names.camelCasesomewhere to the init codepath. I have created a motivating PR here to better describe the issue.
Thanks!
The text was updated successfully, but these errors were encountered:
I think this sort of thing should be checked globally - follow Angular2's example and accept either version in all places it can happen (this is a good case for unit tests) ;-)
Repro is trivial: Just try to queue up a velocity animation to change the
background-color
to#000
. It will fail. However, passing inbackgroundColor
succeeds.Most of the code is set up to allow animating both
background-color
andbackgroundColor
but a small section of code in thestart
handler is missing this normalization code. This causes the code to fail to append theRed
,Green
andBlue
styles. This cascades as a problem inCss.Values.getUnitType
which now defaults topx
because it fails the following regex below:The fix is to add
CSS.Names.camelCase
somewhere to the init codepath. I have created a motivating PR here to better describe the issue.Thanks!
The text was updated successfully, but these errors were encountered: