-
-
Notifications
You must be signed in to change notification settings - Fork 423
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
ng2-pdf-viewer breaks Angular animation for safari on iOS #184
Comments
Same thing happening to me. I had to remove all the animations because it breaks the entire app. |
Having the exact same problem |
We are experiencing the same issue. The issue may be with pdfjs: Also - when using functionality that lazy-loads pdfjs-dist animations break. Update: After further investigation the issue seems to stem from pdfjs overwriting window.requestAnimationFrame and window.cancelAnimationFrame on iOS as hinted in this thread. The offending lines are here. The source states that
I am not sure what about requestAnimationFrame on iOS that may be broken but it's been supported since iOS 6. |
@tpmconzentrate Did you find a solution for this issue? |
It looks like pdf.js fixed this issue with their 2.x branch but it is still present in 1.x which is what ng2-pdf-viewer is packaged with. I made my own fork of pdfjs-dist with the requestAnimationFrame polyfill |
I also have this exact problem. |
Any updates on this issue? |
@artdias90 yes, have you tried latest version |
@VadimDez yes thanks! I had hardcoded V4 sorry. I think we should close this |
Fixed in version |
ng2-pdf-viewer breaks the Angular animations only on Safari on iOS. Safari on OS X works fine. Chrome, IE and Firefox work fine as well.
See plunker https://plnkr.co/edit/1EGqrMHVoinzYclltxmH?p=preview.
This plunk just has a simple animation and a ng2-pdf-viewer. When you click the step button the colored div slides to the left and a counter below the div is updated. This works as expected except in Safari on iOS. It loads, but as soon a transition is started, angular just stops without any error. When you remove the transitions and leave the states in it is working again but your'e not able to use transitions. When you remove the ng2-pdf-viewer the animations with transitions work on Safari on iOS.
Another user experiencing this problem: https://stackoverflow.com/a/45849701
The text was updated successfully, but these errors were encountered: