1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-06-07 00:54:07 +00:00

Fix for sidebar not showing #3223 (#3226)

* fix for sidebar not showing

I believe this fixes #3223

* add explaining comment

* ... and fix indentation.
This commit is contained in:
BurningTreeC 2018-05-02 16:31:26 +02:00 committed by Jeremy Ruston
parent aab408109f
commit 5626148202

View File

@ -193,6 +193,7 @@ RevealWidget.prototype.refresh = function(changedTiddlers) {
Called by refresh() to dynamically show or hide the content Called by refresh() to dynamically show or hide the content
*/ */
RevealWidget.prototype.updateState = function() { RevealWidget.prototype.updateState = function() {
var self = this;
// Read the current state // Read the current state
this.readState(); this.readState();
// Construct the child nodes if needed // Construct the child nodes if needed
@ -213,7 +214,11 @@ RevealWidget.prototype.updateState = function() {
$tw.anim.perform(this.openAnimation,domNode); $tw.anim.perform(this.openAnimation,domNode);
} else { } else {
$tw.anim.perform(this.closeAnimation,domNode,{callback: function() { $tw.anim.perform(this.closeAnimation,domNode,{callback: function() {
//make sure that the state hasn't changed during the close animation
self.readState()
if(!self.isOpen) {
domNode.setAttribute("hidden","true"); domNode.setAttribute("hidden","true");
}
}}); }});
} }
}; };