From 285e0411c1e3f3aacd4fea97fa0724d66b6ddbba Mon Sep 17 00:00:00 2001 From: "scott%scott-macgregor.org" Date: Tue, 3 Jan 2006 21:33:40 +0000 Subject: [PATCH] Bug #320185 --> It's impossible to delete or detach attachment via File Menu Patch by mkmelin+bugzilla@cc.hut.fi r/sr=mscott git-svn-id: svn://10.0.0.236/trunk@186875 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/mail/base/content/msgHdrViewOverlay.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mozilla/mail/base/content/msgHdrViewOverlay.js b/mozilla/mail/base/content/msgHdrViewOverlay.js index 0ce2f0743a7..b423b24d4ce 100644 --- a/mozilla/mail/base/content/msgHdrViewOverlay.js +++ b/mozilla/mail/base/content/msgHdrViewOverlay.js @@ -1486,8 +1486,8 @@ function addAttachmentToPopup(popup, attachment, attachmentIndex) openpopup.appendChild(menuseparator); menuitementry = document.createElement('menuitem'); - menuitementry.attachment = attachment; - menuitementry.setAttribute('oncommand', 'this.attachment.detachAttachment()'); + menuitementry.attachment = cloneAttachment(attachment); + menuitementry.setAttribute('oncommand', 'detachAttachment(this.attachment, true)'); menuitementry.setAttribute('label', gDetachLabel); menuitementry.setAttribute('accesskey', gDetachLabelAccesskey); if (attachment.contentType == 'text/x-moz-deleted' || !canDetach) @@ -1495,8 +1495,8 @@ function addAttachmentToPopup(popup, attachment, attachmentIndex) menuitementry = openpopup.appendChild(menuitementry); menuitementry = document.createElement('menuitem'); - menuitementry.attachment = attachment; - menuitementry.setAttribute('oncommand', 'this.attachment.deleteAttachment()'); + menuitementry.attachment = cloneAttachment(attachment); + menuitementry.setAttribute('oncommand', 'detachAttachment(this.attachment, false)'); menuitementry.setAttribute('label', gDeleteLabel); menuitementry.setAttribute('accesskey', gDeleteLabelAccesskey); if (attachment.contentType == 'text/x-moz-deleted' || !canDetach)