Skip to content
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

Bug(MdTabs): Translate animation not working in IE 11 / Edge #4982

Closed
macjohnny opened this issue Jun 6, 2017 · 12 comments · Fixed by #4986
Closed

Bug(MdTabs): Translate animation not working in IE 11 / Edge #4982

macjohnny opened this issue Jun 6, 2017 · 12 comments · Fixed by #4986
Assignees
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@macjohnny
Copy link
Contributor

Bug, feature request, or proposal:

Bug

What is the expected behavior?

When changing tabs, the content should be animated to translate to the left or to the right.

What is the current behavior?

In IE 11 / Edge

What are the steps to reproduce?

http://embed.plnkr.co/bXpnE7/

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular 4.1.3, Material 2.0.0-beta.6

Is there anything else we should know?

Apparently, this is due to animating with "translate3d()". The sidenav e.g. sets the style property instead of using the animation API, which seems to work.

@macjohnny
Copy link
Contributor Author

This should probably solved similar to MdSidenav:
https://github.com/angular/material2/blob/master/src/lib/sidenav/sidenav.ts#L509

@crisbeto
Copy link
Member

crisbeto commented Jun 6, 2017

You need to include a polyfill for web animations, if you want most of the Material animations to work under IE. The sidenav is an exception that will be moved to the Angular animations eventually.

@macjohnny
Copy link
Contributor Author

@crisbeto you are right, i forgot to include the polyfill in the plunkr. However, the problem still remains even with the polyfill. I am currently investigating the issue with a simple plunkr example:
https://plnkr.co/edit/AnLKIlfuz5S6siBZQTIY?p=preview
it seems that this one does not work in IE either. so it might be related to the angular animations API.
What is strange though is the fact that when wildly clicking the toggle button or wildly changing tabs, the animation seems to happen, i.e. when the new animation starts before the previous one completed.

@macjohnny
Copy link
Contributor Author

@macjohnny
Copy link
Contributor Author

the issue here in material is most probably due to a bug in angular: angular/angular#17239

@julianobrasil
Copy link
Contributor

julianobrasil commented Jun 6, 2017

@macjohnny , I tested here against IE11 and Edge.

IE11: Although there's a little delay, and something that resembles an animation, the rectangle's position is switched form one side to another.

Edge: worked fine

@macjohnny
Copy link
Contributor Author

@julianobrasil can you check what happens in https://fiddle.jshell.net/fu7mrqn0/8 ?
the first example does not work in my IE 11. and I suppose this is exactly the problem with this issue here and the one here: angular/angular#17239

@julianobrasil
Copy link
Contributor

julianobrasil commented Jun 6, 2017

@macjohnny , here is the report:

IE11: didn't work fine in just one case: "translate with percentages, 2 keyframes".
In my opinion: it's like the plunker example, where the so called "animation" seems more like a subtle change of position. In the fiddle's case, as the square goes back to its original position in the end, it seems the animation did not happen at all.

For all the others cases in IE11, the animation ran smoothly.

Edge: no problem. All cases seemed to work as expected.

@macjohnny
Copy link
Contributor Author

@julianobrasil thanks for having a look at it.
yes, in the jsfiddle example the square jumps back to its original position after the animation, which is no problem since no state after the animation was defined.
the problem still remains, however. if you compare the jsfiddle in chrome and in IE 11, the difference is very clear: in IE 11, the box does not move at all. also in the "translate with percentages, 3 keyframes" example, the box jumps to half-the translation after half the transition time, which to me seems like a problem animating between the first and the second keyframe.

@macjohnny
Copy link
Contributor Author

Here is a workaround: using translate3d(0%,0,0) instead of translate3d(0,0,0) apparently fixes the problem, see this example: https://plnkr.co/edit/1Ffduxu1N3PJKgHutRuw?p=preview

However, I think this should be fixed in web-animations-js, since translating from translate3d(0,0,0) to translate3d(100px,0,0) works, whereas translating from translate3d(0,0,0) to translate3d(100%,0,0) does not.

@andrewseguin andrewseguin self-assigned this Jun 6, 2017
@jelbourn jelbourn added the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label Jun 7, 2017
@macjohnny
Copy link
Contributor Author

@andrewseguin @jelbourn the workaround suggested here and in PR #4986 seems to work fine, we had no more issues with that.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants