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
I'm using AngularJS with ngRoute and when I move from one view to another, I found that if the two consecutive views each have a scroll container with the same ID, the scrolling breaks.
The workaround is easy - make sure that each of your scroll containers have unique IDs.
I determined this was the issue by stepping through this function:
proto.duScrollTo = function (left, top, duration, easing) {
var aliasFn;
if (angular.isElement(left)) {
aliasFn = this.duScrollToElement;
} else if (angular.isDefined(duration)) {
aliasFn = this.duScrollToAnimated;
}
if (aliasFn) {
return aliasFn.apply(this, arguments);
}
var el = unwrap(this);
if (isDocument(el)) {
return $window.scrollTo(left, top);
}
el.scrollLeft = left;
el.scrollTop = top; // <-- this was not updating probably because el is referencing an object that's not likely on the DOM anymore
};
The text was updated successfully, but these errors were encountered:
I'm using AngularJS with ngRoute and when I move from one view to another, I found that if the two consecutive views each have a scroll container with the same ID, the scrolling breaks.
The workaround is easy - make sure that each of your scroll containers have unique IDs.
I determined this was the issue by stepping through this function:
The text was updated successfully, but these errors were encountered: