From 57e3865d189fcec53548fc1894587488096c8be5 Mon Sep 17 00:00:00 2001 From: Robin Ward <robin.ward@gmail.com> Date: Thu, 11 Sep 2014 13:05:47 -0400 Subject: [PATCH] FIX: Scroll position when using the back button --- app/assets/javascripts/discourse/models/topic_list.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/models/topic_list.js b/app/assets/javascripts/discourse/models/topic_list.js index 8b92242d6..576d257ab 100644 --- a/app/assets/javascripts/discourse/models/topic_list.js +++ b/app/assets/javascripts/discourse/models/topic_list.js @@ -217,10 +217,12 @@ Discourse.TopicList.reopenClass({ } return resolve(cachedList); } + session.set('topicList', null); + } else { + // Clear the cache + session.setProperties({topicList: null, topicListScrollPosition: null}); } - // Clear the cache - session.setProperties({topicList: null, topicListScrollPosition: null}); // Clean up any string parameters that might slip through filterParams = filterParams || {};