Commit 3c841761 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Fix regression in membering scroll of index pages.

Caused by myself through moving that logic into Content controller.
parent ac68a567
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -19,11 +19,9 @@ Ext.define('Docs.controller.Content', {
    title: "",

    onLaunch: function() {
        this.getIndex().on('afterrender', function() {
            cmp.el.addListener('scroll', function(cmp, el) {
        this.getIndex().getEl().addListener('scroll', function(cmp, el) {
            this.setScrollState(this.baseUrl, el.scrollTop);
        }, this);
        }, this);
    },

    loadIndex: function(noHistory) {
@@ -31,7 +29,7 @@ Ext.define('Docs.controller.Content', {
        this.getViewport().setPageTitle(this.title);
        Ext.getCmp('doctabs').activateTab(this.baseUrl);
        Ext.getCmp('card-panel').layout.setActiveItem(this.getIndex());
        this.getIndex().getEl().scrollTo('top', this.getScrollState("#"));
        this.getIndex().getEl().scrollTo('top', this.getScrollState(this.baseUrl));
    },

    // True when middle mouse button pressed or shift/ctrl key pressed