You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: