I have returned to this and here is one way to replicate the problem, more questions and a possible solution.
To attempt to replicate on TiddlyWiki.com
- Create a “New Tiddler” and save
- Now edit the “New Tiddler”
- While still editing go to the “Recent Tab” and select the original title “New Tiddler”
- not the “Draft of ‘New Tiddler’”
- “New Tiddler” opens in the story at the same time as “Draft of ‘New Tiddler’”
- I will call this the “Original tiddler”
- Now click edit on “New Tiddler” and it closes and the current draft is “scrolled to”.
- While still editing go to the “Recent Tab” and select the original title “New Tiddler”
- not the “Draft of ‘New Tiddler’”
- “New Tiddler/original tiddler” opens in the story at the same time as “Draft of ‘New Tiddler’”
- But this time use the more dropdown and clone “NewTiddler”
You will now have in the story;
Draft of 'New Tiddler 1' by visitor
New Tiddler
Draft of 'New Tiddler' by visitor
Notes
- When listing tiddlers it is easy to create a link which will also open the original tiddler while a draft is ALSO open in the story
- editing this extra tiddler by default opens the one currently in draft and hides the original in the story
- This is working OK so how do the extra drafts arise? See below using clone.
- Does this mean we should look at improving the link mechanism to locate and open the draft?
- If you have both the draft and the original tiddler open, then clone the original tiddler it can look as if you have two drafts of the same tiddler
- But this is misleading you have a draft of the original and a clone of the original in draft even though you have not yet saved the clone.
Can you reproduce this any other way?
Here is a button I created that demonstrates the use of the following filter
[all[tiddlers]draft.of<currentTiddler>else<currentTiddler>]
which navigates to a draft.of the current tiddler if it exists, and it is used to set the tooltip in this example.
<$button tooltip={{{ [all[tiddlers]draft.of<currentTiddler>then[draft tiddler exists]else[no current draft]] }}}
to={{{ [all[tiddlers]draft.of<currentTiddler>else<currentTiddler>] }}} class="tc-btn-invisible">
{{$:/core/images/warning}}
</$button>
Now the following button which does not use this filter, will if used on the “original tiddler” will only navigate to the original tiddler and is not aware of the draft tiddler.
<$button to=<<currentTiddler>> class="tc-btn-invisible">
{{$:/core/images/warning}} std
</$button>
- Perhaps this is another opportunity to mess this up?