Commit 9b8ee45c authored by Mike Greiling's avatar Mike Greiling

sync sidebar DOM state on page:change to minimize split-second appearance of...

sync sidebar DOM state on page:change to minimize split-second appearance of the sidebar in certain situations
parent 32c53d6d
...@@ -23,8 +23,6 @@ ...@@ -23,8 +23,6 @@
if (!singleton) { if (!singleton) {
singleton = this; singleton = this;
singleton.init(); singleton.init();
} else {
singleton.renderState();
} }
return singleton; return singleton;
} }
...@@ -38,7 +36,8 @@ ...@@ -38,7 +36,8 @@
$(document) $(document)
.on('click', sidebarToggleSelector, () => this.toggleSidebar()) .on('click', sidebarToggleSelector, () => this.toggleSidebar())
.on('click', pinnedToggleSelector, () => this.togglePinnedState()) .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(); this.renderState();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment