:leave animation does not work on Firefox and Edge
See original GitHub issueI’m submitting a…
[x] Bug report
Current behavior
The enter animation is working fine on all the browsers, but the leave animation is not working on firefox and edge (works on chrome and safari)
Expected behavior
Should work as it works in chrome and safari
Minimal reproduction of the problem with instructions
https://stackblitz.com/edit/angular-xivr7n
Environment
Angular version: 5.0.0
Browser:
- [x] Firefox version 57
- [x] Edge version 41
For Tooling issues:
- Node version: XX
- Platform:
Others:
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Angular animation doesn't work in Firefox - Stack Overflow
I am using the below code to gradually hide a DIV in Angular 2. This perfectly works in Chrome and Microsoft Edge. But...
Read more >Edge Animate animations not working with FIREFOX
Solved: Problem with FIREFOX Almost all of my websites have animated sliders on them that have been made with Edge Animate in Muse....
Read more >Work with animations — Firefox Source Docs documentation
This article covers three tools you can use to visualize and edit animations: the animation inspector. diting @keyframes. editing timing functions ...
Read more >3 Ways to Fix Keyframes if not Working in Firefox
How do I fix keyframes if they are not working in Firefox? · 1. Double-check the code · 2. Set animation duration ·...
Read more >Animations does not work on Edge/Internet explorer. Why?
Although I added -webkit the animation is still not supported by Edge or IE. Can you help me figure out why? Below is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In your case Angular needs to calculate styles for
width
(explicitly set to*
) andmargin
(not provided but used in animation, so implicitly*
).From documentation for style function.
Angular uses
Window.getComputedStyle
to calculate property value for auto-styles.Window.getComputedStyle
returns empty string formargin
property in Firefox. When property value is empty string, Angular setsREMOVAL_FLAG
of element toNULL_REMOVED_QUERIED_STATE
and then theNoopAnimationPlayer
is used - animation does not play.When property is not longhand property, we should ignore its empty value.
According to specification of CSS Object Model,
Window.getComputedStyle
returns all longhand properties. While iterate over numeric indexes ofWindow.getComputedStyle
, there is nomargin
property in Chrome and Firefox. But when accessmargin
property directly, there is non-empty value in Chrome and empty value in Firefox. We cannot rely on this across the browsers.Workaround is use of longhand properties.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.