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

add rejection handler (angular.noop) in duSmoothScroll directive #215

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

justphil
Copy link

Add a rejection handler (angular.noop) in the duSmoothScroll directive in order to prevent "Possibly unhandled rejection" errors with AngularJS >= 1.6 in case the user cancels the scroll animation.

Steps to reproduce:

  1. Open this plunker.
  2. Double click the links which trigger animated scrolling (Section 1, 2, 3)
  3. The second click will always cancel the animated scrolling if you're fast enough.
  4. Check the browser console to see the "Possibly unhandled rejection" errors.

Some more details regarding unhandled promise rejections can be found in this blog post.

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.

1 participant