[Tickets #4271] NEW: Prompt on closing message window

bugs@bugs.horde.org bugs at bugs.horde.org
Tue Aug 8 19:33:22 PDT 2006


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=4271
-----------------------------------------------------------------------
 Ticket             | 4271
 Created By         | phyre at rogers.com
 Summary            | Prompt on closing message window
 Queue              | IMP
 Version            | HEAD
 Type               | Enhancement
 State              | New
 Priority           | 2. Medium
 Owners             | 
-----------------------------------------------------------------------


phyre at rogers.com (2006-08-08 19:33) wrote:

It happens to all of us- the accidental close of a compose window by
clicking the wrong one, pressing the key combination to the wrong window,
or so on.  People put a lot of work into messages.

This simple addition prevents that:

imp/templates/compose/compose.js

I added this just above the 'function confirmCancel()' at the top of the
file within the script tags.  In theory, it could go anywhere.
------------
window.onbeforeunload = bunload;
function bunload(){
        dontleave="Are you sure you want to close this window?  Closing
this window will discard any unsaved changes.";
        return dontleave;
}
-------------

This will prompt the user upon closure.  I have tested this on FireFox and
Internet Explorer.

A small addition, but an important one.




More information about the bugs mailing list