Visible scroll jump on state change


When I’m changing between states the scroll position is retained, but there is a visible jump from the top of the page to the previous position.

See video:

Is this Cordova, Angular, or Ionic?

Any way to work around this so the position is retained but the user doesn’t see the scroll position jump?


Anyone have any thoughts on this?

I cannot figure a workaround and this is forcing me to do some less than desirable things with my application flow.



This seems like it should be a really easy fix, yet it is causing significant problems.



Did you ever find a solution to this? I’m having the same problem!


Still no solution, and all of the workarounds are lousy.

I’m a bit disappointed, it seems like such a trivial issue to fix but no one has chimed in with any help yet…


Having this same exact issue. Guess the Ionic team is working on making scroll better in the background possibly? Maybe we should open an issue?


This is due to $location.hash() method rewritten by ionic in ionic.bundle.js line 39 499.
You may comment this rewritting :

Line 39499 -- in ionic.bundle.js

function $LocationDecorator($location,$timeout){
$location.hash = function(value) {
  /*if (angular.isDefined(value)) {
    $timeout(function() {
      var scroll = document.querySelector('.scroll-content');
      /*if (scroll)
        scroll.scrollTop = 0;
    }, 0, false);
  return $location.__hash(value);

Maybe a param will allow to configure that in a future version…