diff options
author | Mike Greiling <mike@pixelcog.com> | 2016-09-02 20:23:35 -0500 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2016-09-07 14:02:21 -0500 |
commit | 9b8ee45c87588c16337d2b1c3cff1fc52aec1571 (patch) | |
tree | 994131d0f37ad8744f17c0aee9e6d25b9a4a20a3 /app/assets/javascripts/sidebar.js.es6 | |
parent | 32c53d6d1b71885acbcab7829e197744a357c9fc (diff) | |
download | gitlab-ce-9b8ee45c87588c16337d2b1c3cff1fc52aec1571.tar.gz |
sync sidebar DOM state on page:change to minimize split-second appearance of the sidebar in certain situations19183-refactor-sidebar-js
Diffstat (limited to 'app/assets/javascripts/sidebar.js.es6')
-rw-r--r-- | app/assets/javascripts/sidebar.js.es6 | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/assets/javascripts/sidebar.js.es6 b/app/assets/javascripts/sidebar.js.es6 index 0cd6f946f61..755fac8107b 100644 --- a/app/assets/javascripts/sidebar.js.es6 +++ b/app/assets/javascripts/sidebar.js.es6 @@ -23,8 +23,6 @@ if (!singleton) { singleton = this; singleton.init(); - } else { - singleton.renderState(); } return singleton; } @@ -38,7 +36,8 @@ $(document) .on('click', sidebarToggleSelector, () => this.toggleSidebar()) .on('click', pinnedToggleSelector, () => this.togglePinnedState()) - .on('click', 'html, body', (e) => this.handleClickEvent(e)); + .on('click', 'html, body', (e) => this.handleClickEvent(e)) + .on('page:change', () => this.renderState()); this.renderState(); } |