FIX: If you hit back while a `replaceState` was queued up it would

update the URL even after navigating.
This commit is contained in:
Robin Ward 2014-07-24 11:26:53 -04:00
parent a34037b26c
commit 0b368993b7
1 changed files with 5 additions and 1 deletions

View File

@ -98,7 +98,11 @@ Discourse.TopicRoute = Discourse.Route.extend({
}
},
willTransition: function() { isTransitioning = true; return true; }
willTransition: function() {
Em.run.cancel(scheduledReplace);
isTransitioning = true;
return true;
}
},
// replaceState can be very slow on Android Chrome. This function debounces replaceState