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

Closing animations are glitchy in Safari #8

Open
doverphone opened this issue May 7, 2014 · 3 comments
Open

Closing animations are glitchy in Safari #8

doverphone opened this issue May 7, 2014 · 3 comments

Comments

@doverphone
Copy link

When closing a modal or popover then modal will appear again briefly after the modal has faded out. To reproduce: go to http://mgcrea.github.io/angular-strap/ in Safari and open/close modals and popovers.

@juleswool
Copy link

This issue also happens occasionally with IE10 and IE11. Does any one know why or have a fix?

@npgauth
Copy link

npgauth commented Aug 27, 2014

Seeing the same thing with the Desktop Safari. I like the animations in the other browsers and would really like to keep them, so if anyone knows a fix, please let us know.. Thanks!

@terranisu
Copy link

Well, I got a solution, but it looks mostly like a workaround and I think it's a bit ugly. I had spent a bunch of time to solve the problem in Safari, but haven't found a better way.
It's possible to increase animation duration in ng-leave classes and to add additional frames in leave animations.

Example for flip.less:

@flip-extended-duration: .7s;
...

.am-flip-x {
  ...
  &.ng-leave {
    animation-duration: @flip-extended-duration;
    animation-name: flipOutX;
    animation-play-state: paused;
    &.ng-leave-active {
      animation-play-state: running;
    }
  }
}

...

@keyframes flipOutX {
  from {
    opacity: 1;
    transform: perspective(400px) rotateX(0deg);
  }
  // Additional frame
  50% {
    opacity: 0;
    transform: perspective(400px) rotateX(60deg);
  }
  to {
    opacity: 0;
    transform: perspective(400px) rotateX(90deg);
  }
}

Changes for all other animations you can find in my fork: https://github.com/terranisu/angular-motion
I can create pull request if @mgcrea interested in my solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants