8000 getAnimationStyle causes exceptions in older browsers · Issue #24094 · angular/angular · GitHub
[go: up one dir, main page]

Skip to content
getAnimationStyle causes exceptions in older browsers #24094
Closed
@janousek

Description

@janousek

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[X] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:

Current behavior

Errors are thrown during collection of animation styles (in older browsers).
The problem is on this line:


Most of browsers will return empty string if the style property is not set. But some browsers (like Chrome on Android 4.4) returns null instead of empty string.
Several string functions are applied on the output of the method "getAnimationStyle" - like trim, split, indexOf, etc... But if the output of the"getAnimationStyle" is null, exception is thrown.

Simple fix of this bug:

  return element.style[ANIMATION_PROP + name] || '';

Expected behavior

Animation should work without errors.

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Environment


Angular version: 6.0.3


Browser:
- [ ] Chrome (desktop) version XX
- [X] Chrome (Android) version 34
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: XX  
- Platform:  

Others:

Metadata

Metadata

Labels

P2The issue is important to a large percentage of users, with a workaroundarea: animationsfreq3: highregressionIndicates than the issue relates to something that worked in a previous versionstate: has PRtype: bug/fix

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0