FIX: Was not resuming scroll position on back button
This commit is contained in:
parent
14f075e812
commit
d44d2b3f10
|
@ -7,7 +7,7 @@
|
|||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.DiscoveryTopicsView = Discourse.View.extend(Discourse.ScrollTop, Discourse.LoadMore, {
|
||||
Discourse.DiscoveryTopicsView = Discourse.View.extend(Discourse.LoadMore, {
|
||||
eyelineSelector: '.topic-list-item',
|
||||
|
||||
actions: {
|
||||
|
@ -25,6 +25,15 @@ Discourse.DiscoveryTopicsView = Discourse.View.extend(Discourse.ScrollTop, Disco
|
|||
}
|
||||
},
|
||||
|
||||
_readjustScrollPosition: function() {
|
||||
var scrollTo = Discourse.Session.currentProp('topicListScrollPosition');
|
||||
if (scrollTo) {
|
||||
Em.run.schedule('afterRender', function() {
|
||||
$(window).scrollTop(scrollTo);
|
||||
});
|
||||
}
|
||||
}.on('didInsertElement'),
|
||||
|
||||
_updateTitle: function() {
|
||||
Discourse.notifyTitle(this.get('controller.topicTrackingState.incomingCount'));
|
||||
}.observes('controller.topicTrackingState.incomingCount'),
|
||||
|
|
Loading…
Reference in New Issue