id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
1208	Bug with option chkToggleLinks,	MartinBudden	JeremyRuston	"From John B Thiel:

In v2.5.3 there appears a bug with option chkToggleLinks, such that it will close a tiddler with an edit in progress (thus destroying data).
The problem is the direct call to closeTiddler() in:
{{{
Story.prototype.displayTiddler =
function(srcElement,tiddler,template,animate,unused,customFields,toggle,animationSrc)
{
       var title = (tiddler instanceof Tiddler) ? tiddler.title : tiddler;
       var tiddlerElem = this.getTiddler(title);
       if(tiddlerElem) {
               if(toggle)
                       this.closeTiddler(title,true);
else
                       this.refreshTiddler(title,template,false,customFields);
       } else {
               var place = this.getContainer();
               var before = this.positionTiddler(srcElement);
               tiddlerElem =
this.createTiddler(place,before,title,template,customFields);
       }
}}}

The code should be doing some check as in
{{{
Story.prototype.closeAllTiddlers = function(exclude)
{
       clearMessage();
       this.forEachTiddler(function(title,element) {
               if((title != exclude) && element.getAttribute(""dirty"")
!= ""true"")
                       this.closeTiddler(title);
       });
       window.scrollTo(0,ensureVisible(this.container));
};
}}}



Also note for future tidying, I would say a function called
""displayTiddler"" should not be closing tiddlers at all.  The logic to toggle close/open should probably be at another level/function."	defect	closed	minor	2.6.1	core		undefined	fixed		
