I’m adding some code to scroll to a specific entry in a list by default (it’s a list of events, and I want the view to default to the next event…)
When I use “scrollToElement” on one of my list entries, I can no longer scroll back up to older entries before the one I’ve scrolled to. It just does the “pull to refresh” kind of rubber-banding at the location I’ve scrolled to, rather than letting me go back up to the top. Is there a way to change this behavior?
I had tried that originally (well, sending the ‘scroll.anchorScroll’ event myself) and I had the same issue.
I’ve updated my plunkr to fix the numeric-id thing (my real code isn’t using numeric IDs, I just did that for convenience in the plunkr) and changed it to use nightly and $ionicScrollDelegate.anchorScroll() and now it starts scrolling down to 500, then scrolls back up to the top.
It appears that the $location.hash() makes it scroll immediately, and then the $ionicScrollDelegate.anchorScroll() call sends it back up to the top.