1
0
mirror of https://github.com/flarum/core.git synced 2025-05-06 07:25:22 +02:00

Remember scroll position when returning to index

This commit is contained in:
Toby Zerner 2015-02-06 10:36:30 +10:30
parent cab17be53a
commit 3acf247c07

View File

@ -4,6 +4,11 @@ export default Ember.View.extend({
didInsertElement: function() {
this.updateTitle();
$(window).scrollTop(this.get('controller.scrollTop'));
},
willDestroyElement: function() {
this.set('controller.scrollTop', $(window).scrollTop());
},
updateTitle: function() {