> I have, however, found a bug. Closing a normal browser window with > open tiddlers prompts you, and prevents closing if you select > "Cancel". In an hta file I get the prompt, but clicking cancel makes > no difference, the file is going to close no matter what, and I'm > going to lose my changes.
The ability of the browser to block exiting from the page is based on handling the 'onbeforeunload' event trigger. However, this event is not supported by all browsers (and also apparently not by HTA files either). Fortunately, there *is* a fallback event trigger that all browsers support: 'onunload'. Unfortunately, this event only permits you to add some 'cleanup' handling on the way out... once the 'onunload' trigger has occurred, you cannot cancel the exit action entirely and remain on the page. In order to provide *some* kind of 'data safety' for browser's that don't support 'onbeforeunload', you can use this plugin: http://www.TiddlyTools.com/#ConfirmExitPlugin Although this plugin cannot stop the document from being closed, enabling the "save-before-exiting" setting will give you the option to *save* your changes before continuing to exit, so at least your work won't be lost. enjoy, -e Eric Shulman TiddlyTools / ELS Design Studios --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/TiddlyWiki?hl=en -~----------~----~----~----~------~----~------~--~---

