I have a problem. I've created a modal state, that is a state for modal and is a child state of a root state. In the root state I have a list of articles in ng-repeat that create a scrollable view. Each element in that list opens modal with different parameter, but just before it opens my list scroll backs to first element. So if I scroll to the bottom of page and open some 'article' in modal, the modal opens but state in background is scrolled to top, so when I close modal I'm once again on top. I gave my best to explain my problem.
Asked
Active
Viewed 43 times
0
-
Does [this SO post](http://stackoverflow.com/questions/14107531/retain-scroll-position-on-route-change-in-angularjs) help? How about [this post](http://stackoverflow.com/questions/23736647/how-to-retain-scroll-position-of-ng-repeat-in-angularjs)? – BBauer42 Feb 08 '16 at 18:25
-
I dont think this would help me, i tried somethin similar, but the problem is that parent state is scrolling to top on opening the modal, not on close. And controller of parent is not getting reloaded. Even if i do this, then on opening i would get scroll to start and on closing scroll to item that was opened, and that is bad UX. – Cvele Feb 09 '16 at 22:49