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

Fixing requestAnimationFrame & cancelAnimationFrame #1430

Merged
merged 1 commit into from
Jun 6, 2014

Conversation

malixsys
Copy link

With the previous implementation, Chrome complains:
"'webkitCancelAnimationFrame' is vendor-specific. Please use the standard 'cancelAnimationFrame' instead."
This fixes that by reusing (copy-paste) the code from angular.js
A better way would be to use ionic.requestAnimationFrame and ionic.cancelAnimationFrame everywhere, but that is more involved and risky...

With the previous implementation, Chrome complains:
    "'webkitCancelAnimationFrame' is vendor-specific. Please use the standard 'cancelAnimationFrame' instead."
This fixes that by reusing (copy-paste) the code from angular.js
A better way would be to use ionic.requestAnimationFrame and ionic.cancelAnimationFrame everywhere, but that is more involved and risky...
@ajoslin
Copy link
Contributor

ajoslin commented Jun 4, 2014

LGTM. @adamdbradley?

adamdbradley added a commit that referenced this pull request Jun 6, 2014
fix(rAF): fixing requestAnimationFrame & cancelAnimationFrame
@adamdbradley adamdbradley merged commit a43980b into ionic-team:master Jun 6, 2014
@adamdbradley
Copy link
Contributor

Thanks!

ajoslin added a commit that referenced this pull request Jun 16, 2014
A pull request (#1430) was merged that added a requestAnimationFrame polyfill to
the window on platforms that do not have rAF.  This was overlooked.
This now has created conflicts with Angular 1.2.17 on Android browsers
that do not have requestAnimationFrame.

The problem was that a polyfill for requestAnimationFrame was put onto the
window for Android <4.3. AngularJS would then check if
window.requestAnimationFrame existed.  Angular's check passed, and then
it would try to use cancelAnimationFrame which was undefined.

Now, nothing on the window is changed.
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

Successfully merging this pull request may close these issues.

3 participants