6.0.0-alpha12
6/8/25

[#4271] Prompt on closing message windowr
Summary Prompt on closing message windowr
Queue IMP
Queue Version HEAD
Type Enhancement
State Resolved
Priority 2. Medium
Owners
Requester phyre (at) rogers (dot) com
Created 08/09/2006 (6878 days ago)
Due
Updated 08/10/2006 (6877 days ago)
Assigned
Resolved 08/09/2006 (6878 days ago)
Milestone
Patch No

History
08/10/2006 07:25:48 AM Jan Schneider Summary ⇒ Prompt on closing message windowr
 
08/09/2006 10:18:57 PM Chuck Hagenbuch Comment #3
Summary ⇒ Prompt on closing message windowrr
State ⇒ Resolved
Reply to this comment
Implemented, with translations, in HEAD. Thanks!
08/09/2006 02:48:41 AM phyre (at) rogers (dot) com Comment #2
New Attachment: onclose.patch Download
Reply to this comment
I had forgotten to turn that off upon clicking the submit, draft, and 
cancel button.  It resulted in a prompt on submit/draft and two 
prompts on cancel.



That should be fixed in this new patch.  see this patch for a properly 
working copy.  It disabled it just prior to the submission success and 
only if the cancel prompt is accepted.



-M
08/09/2006 02:33:21 AM phyre (at) rogers (dot) com Comment #1
Priority ⇒ 2. Medium
Type ⇒ Enhancement
Summary ⇒ Prompt on closing message window
Queue ⇒ IMP
State ⇒ New
Reply to this comment
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.

Saved Queries