At my job we have a one page site I created with AngularJS.
We\'re using the ui-router plugin (version 0.2.0).
Recently I\'ve noticed that when moving from one state
As @Hans commented, there wasn't actually a problem.
I had a wrapping element, that was positioned absolute with:
top:0;
bottom:0;
left:0;
right:0;
overflow:auto
So The window's scrollTop was always 0, and the scrollbar actually belonged to the wrapping element.
Since I could't get rid of the wrapping element's positioning, I used ui-router's $stateChangeSuccess event, and manually scrolled the wrapping element to the top.