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

Support promises on callback-before #39

Open
xaralis opened this issue Sep 7, 2015 · 0 comments
Open

Support promises on callback-before #39

xaralis opened this issue Sep 7, 2015 · 0 comments

Comments

@xaralis
Copy link

xaralis commented Sep 7, 2015

It would be nice if callback-before would support thenable objects (promises) as well. It would simplify things when one needs to trigger the scrolling after some other promise (which is triggered by clicking the link) is finished.

For example, we have overflow: hidden on document when showing an aside menu. When user clicks a menu item, it is closed returning a promise and then we would like to scroll to proper element on the page. However, since closing the aside menu takes some time, scrolling doesn't work most of the time, because it does not wait for callback-before to finish in case it's an async call like promise.

Hope it makes sense. I think that the change will be very simple. Can post a PR if interested. It just seems that callback-before might not be the right place for this.

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

1 participant