Last Comment Bug 352310 - email composer loses all keystrokes while saving draft
: email composer loses all keystrokes while saving draft
Status: RESOLVED FIXED
: dataloss
Product: SeaMonkey
Classification: Client Software
Component: MailNews: Message Display (show other bugs)
: Trunk
: x86 Windows XP
: -- normal with 1 vote (vote)
: ---
Assigned To: David :Bienvenu
:
Mentors:
: 396094 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-12 01:16 PDT by Nelson Bolyard (seldom reads bugmail)
Modified: 2007-09-14 01:44 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch against the seamonkey trunk (3.84 KB, patch)
2006-10-26 11:18 PDT, David :Bienvenu
neil: review+
Details | Diff | Review
address Neil's comments... (3.91 KB, patch)
2006-10-26 15:50 PDT, David :Bienvenu
mscott: superreview+
Details | Diff | Review

Description Nelson Bolyard (seldom reads bugmail) 2006-09-12 01:16:39 PDT
New regression.  100% repeatable with 
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) \
    Gecko/20060824 SeaMonkey/1.5a
Not seen with Seamonkey trunk version from 20060702.

Whie composing email, when SeaMonkey goes to see if there is any new email,
The recipient address portion of the composer window goes gray, a progress
meter appears in composer status bar, and all keystrokes typed while this
is going on are lost.
Comment 1 Nelson Bolyard (seldom reads bugmail) 2006-09-12 17:28:23 PDT
The problem occurs while composing email in a composition window for my
IMAPS account.  

I have configured SeaMonkey to "Automatically save the message every 5 minutes".
The workaround is to disable that feature. :(

So, about every 5 minutes, it saves a copy to my IMAPS server.  While it is 
doing so, the composer silently loses all keystrokes being entered.  
Since I don't always look at the screen while typing, I don't always notice 
the missing characters from the body of the message I type.

I never noticed this before upgrading to the 20060824 SeaMonkey build.
Comment 2 David :Bienvenu 2006-09-12 17:35:02 PDT
this is a trunk build? I fixed this a while ago, though I'm not sure if the code was shared between SM and TB - I can double check. 
Comment 3 Nelson Bolyard (seldom reads bugmail) 2006-09-12 17:49:17 PDT
Yes, Seamonkey trunk build.
Comment 4 David :Bienvenu 2006-09-12 19:14:00 PDT
see bug 323351 for the TB fix - the same thing should work for Seamonkey.
Comment 5 Nelson Bolyard (seldom reads bugmail) 2006-09-12 19:50:25 PDT
So, this is a SeaMonkey bug, not a core bug, I gather.
Comment 6 David :Bienvenu 2006-09-12 20:12:00 PDT
yes, it's a SM bug - if you can't get any traction from the SM guys, let me know and I can try to get to it. But it would be easier if a Seamonkey person tried to port that patch.
Comment 7 Nelson Bolyard (seldom reads bugmail) 2006-10-25 15:16:46 PDT
David, I want to take you up on your offer (in comment 6 ).  
Please, and thanks!
Comment 8 David :Bienvenu 2006-10-26 11:18:08 PDT
Created attachment 243685 [details] [diff] [review]
patch against the seamonkey trunk

I haven't tried running with this patch (my SM build is still going) but it should work the same as in TB.
Comment 9 neil@parkwaycc.co.uk 2006-10-26 15:43:31 PDT
Comment on attachment 243685 [details] [diff] [review]
patch against the seamonkey trunk

>+        gAutoSaving = (msgType == nsIMsgCompDeliverMode.AutoSaveAsDraft);
Nit: don't need these ()s

>+        // disable the ui if we're not auto-saving
>+        if (!gAutoSaving)
>+        {
>+          gWindowLocked = true;
>+          disableEditableFields();
>+          updateComposeItems();
>+        }
>+        // if we're auto saving, mark the body as not changed here, and not
>+        // when the save is done, because the user might change it between now
>+        // and when the save is done.
>+        else 
>+          SetContentAndBodyAsUnmodified();
Nit: inverted conditions with else clauses can be confusing. Prefer:
// if we're auto saving, mark the body as not changed here, because
// the user might change it between now and when the save completes
if (gAutoSaving)
  SetContentAndBodyAsUnmodified();
else
{
  // disable the ui if we're really saving
  etc.
}
Comment 10 David :Bienvenu 2006-10-26 15:50:40 PDT
Created attachment 243723 [details] [diff] [review]
address Neil's comments...

Scott, can you sr this SM patch? It's just ported from TB and will hopefully make Nelson's life a little easier :-)
Comment 11 Scott MacGregor 2006-10-26 16:01:14 PDT
Comment on attachment 243723 [details] [diff] [review]
address Neil's comments...

happy to review a back port to seamonkey.
Comment 12 David :Bienvenu 2006-10-26 16:49:40 PDT
fixed on trunk.
Comment 13 Nelson Bolyard (seldom reads bugmail) 2006-10-26 17:17:55 PDT
Many thanks to you, David, Neil and Scott.  
I owe you all a beer (or equivalent :)
Comment 14 Bruno 'Aqualon' Escherl 2007-09-14 01:44:37 PDT
*** Bug 396094 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.