I have a friend who’s not very literate in TiddlyWiki yet who this morning wrote up a complicated tiddler on our Bob-enabled shared wiki and then inadvertently closed the page without saving it. (Fortunately they had saved a copy somewhere else, so all is well in this case.) It appears they just forgot to click the accept button on the tiddler before closing the tab.
I didn’t expect this to be a problem because I’m used to the built-in Node server, which syncs drafts almost instantly and will just reopen them if you close the tab and later navigate back to the wiki. Bob doesn’t sync drafts (maybe because of locking issues?) which kind of stinks, but is understandable. But in this case, the browser should at least be able to warn you you’re about to leave with unsaved changes! But it doesn’t – I did some more testing, and in all circumstances I can find, if you accidentally navigate away from the page for whatever reason, everything you wrote in a draft is just gone forever instantly.
In this thread, it was mentioned that $:/config/SyncFilter
controls what causes the warning to appear. And indeed, Bob sets this to contain -[has[draft.of]]
. But even removing that line doesn’t cause the changes warning to come back (and when I reload the wiki the tiddler gets reset, for reasons I can’t quite figure out; in any event, just removing this doesn’t seem particularly wise, as presumably there was a reason to exclude that).
The save-changes message is not broken in general – for instance when I save a tiddler and then immediately navigate away from the page before it has had time to sync to the server, I get a warning.
Anyone have ideas on how this could be fixed? I’ve already patched several pieces of software in this ensemble manually, so I’m not averse to changing some code if need be.
Also reported here: saving drafts · Issue #197 · OokTech/TW5-Bob · GitHub