Closed Bug 333511 Opened 18 years ago Closed 16 years ago

Only the first of multiple selected attachments are deleted/detached from a given message

Categories

(Thunderbird :: Mail Window Front End, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3

People

(Reporter: bugzilla, Assigned: bugzilla.mozilla.org-3)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.11) Gecko/20050727
Build Identifier: Thunderbird version 1.5 (20051201); Mac OS X 10.3.9

 If an incoming message contains multiple attachments and more than one is selected with cmd-click, then 'Delete' or 'Detach...' (chosen from the contextual menu) will display save and/or removal confirmation dialogs for each of the attachments, but only the first attachment is actually removed from the message (all messages are properly saved to the disk in the case of 'Detach').

Reproducible: Always

Steps to Reproduce:
1. Select more than one attachment (using cmd-click) in the attachment pane of an incoming email which contains multiple attachments.
2. Click-and-hold on one of the selected attachments to obtain the contextual menu and choose either 'Delete' or 'Detach'
3. Click OK in save and/or removal confirmation dialogs.

Actual Results:  
Only the first selected attachment is removed from the message.

Expected Results:  
All selected attachments are removed from the message.

Reproduced with a POP3 account.
Cross-ref: Bug 270292 which reports the same behaviour for drag-and-drop.
I can confirm this bug is also happening on Windows XP:

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051201 Thunderbird/1.5 - Build ID: 2005120115

In my case, I am using an IMAP account, and the behavior slightly different.  If I try to delete four attachments from a message, TB creates FOUR new messages, each with only one of the attachments deleted.

So, in order to delete four attachments, I'd have to delete them one at a time, and each time go to the new message to delete the next attachment.
No errors appear on the Javascript Console in relation to the detach operation.

Changing Hardware and OS to All, per Comment #1 and consistent with Bug 270292.

Could someone with the appropriate privileges please confirm this bug?
OS: MacOS X → All
Hardware: Macintosh → All
Confirmed for TB 2.0a1 buld 2006061911
--> click on detach all or save all works well ...
But ok, click on delete show a dialog confirmation box for each files but only the first is deleted ...

One quick solution will be to disable Delete/Detach when multiple files are selected (so, this bug can be the inverted case of bug 333904 and bug 328293)
Status: UNCONFIRMED → NEW
Ever confirmed: true
thunderbird has also problems when dragging multiple files from Attachment-pane to exporer...only the first is copied.
seems to be the same bug...

regards Frank
QA Contact: front-end
Attached patch Fix (obsolete) — Splinter Review
This patch uses the method used for deleting/detaching all attachments rather than deleting the attachments one at a time.

There is still need for the setTimeout() hack for doing "open" and "save as" with several selected attachments. One could consider removing the possibility of doing these actions to several attachments at one time.
Attachment #289141 - Flags: review?(bienvenu)
David, any chance to get the patch reviewed within the next time?
Assignee: mscott → bugzilla.mozilla.org-1
Version: unspecified → Trunk
Henrik, I've just tried, but since I'm not active in the development I do not have at hand the revision 1.100 of msgHdrViewOverlay.js to which the patch applies. 
Sorry.
P.S. Anyway, the bug is easy reproducible by anyone. Just set up a draft message with, say, 21 attachments of 1 MB each, for instance photos from your digicam. Visit the message in the Drafts folder and select (Ctrl-left click) 20 of the attachments for simultaneous deletion. See how awfully long the process takes, and how it goes wrong.
David, thanks but the bug is already confirmed. So no more confirmation is needed. I will apply the patch to my trunk build later today. Let's see how we drive it a bit forward.
Status: NEW → ASSIGNED
As far as I can see the patch works fine. Now all selected attachments get deleted from the message when you detach them. 
Phil, do you have time to take the review request?
David, the attached patch is waiting for a review a really long time. Could you please have a look at it?
Attachment #289141 - Attachment is obsolete: true
Attachment #312106 - Flags: review?(bienvenu)
Attachment #289141 - Flags: review?(bienvenu)
Comment on attachment 312106 [details] [diff] [review]
Fix (updated for bitrot)

Magnus, could you have a look at the updated patch?
Attachment #312106 - Flags: review?(bienvenu) → review?(mkmelin+mozilla)
Comment on attachment 312106 [details] [diff] [review]
Fix (updated for bitrot)

Sorry for the delay. This looks good, thx!
Attachment #312106 - Flags: review?(mkmelin+mozilla) → review+
On a side note just to keep track on it, *opening* detached attachments was already broken (at least for me), still are with this patch. 

I made some very minor adjustments, and checked this in.

Checking in mail/base/content/msgHdrViewOverlay.js;
/cvsroot/mozilla/mail/base/content/msgHdrViewOverlay.js,v  <--  msgHdrViewOverlay.js
new revision: 1.102; previous revision: 1.101
done
Checking in mail/base/content/msgHdrViewOverlay.xul;
/cvsroot/mozilla/mail/base/content/msgHdrViewOverlay.xul,v  <--  msgHdrViewOverlay.xul
new revision: 1.28; previous revision: 1.27
done

->FIXED
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3
Blocks: TB2SM
This bug is still not really fixed in TB 2.0.0.23. It seems to be the basically the same one as reported in https://bugzilla.mozilla.org/show_bug.cgi?id=453144
(In reply to comment #18)

With TB3 I cannot reproduce this bug anymore :-)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: