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
1 changed files with 7 additions and 2 deletions

View File

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