FIX: Back button would go to previous topic instead of list

See related topic:
https://meta.discourse.org/t/back-button-history-not-properly-working/122183

The issue here is the transition was not completing properly which meant
if you backed out of a topic quickly and entered a new one, hitting back
in the second topic would sometimes take you to the previous one instead
of back to the topic list.
This commit is contained in:
Robin Ward 2019-07-05 15:53:14 -04:00
parent 66214eee85
commit de6edf9e4e

View File

@ -89,6 +89,10 @@ export default Discourse.Route.extend({
"previousURL",
document.location.pathname
);
// NOTE: omitting this return can break the back button when transitioning quickly between
// topics and the latest page.
return true;
}
}
});