From 95204af6586041982b3d621298679c0d3e39928d Mon Sep 17 00:00:00 2001 From: "scott%scott-macgregor.org" Date: Mon, 17 Apr 2006 04:10:24 +0000 Subject: [PATCH] Bug #314086 --> able to see old subject headers in the compose window. sr=bienvenu git-svn-id: svn://10.0.0.236/trunk@194497 18797224-902f-48f8-a5cc-f745e15eee43 --- .../compose/content/MsgComposeCommands.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/mozilla/mail/components/compose/content/MsgComposeCommands.js b/mozilla/mail/components/compose/content/MsgComposeCommands.js index b688e6745fc..6990b7d34b6 100644 --- a/mozilla/mail/components/compose/content/MsgComposeCommands.js +++ b/mozilla/mail/components/compose/content/MsgComposeCommands.js @@ -215,11 +215,14 @@ var gComposeRecyclingListener = { awResetAllRows(); RemoveAllAttachments(); - // We need to clear the identity popup menu in case the user will change them. It will be rebuilded later in ComposeStartup + // We need to clear the identity popup menu in case the user will change them. + // It will be rebuilt later in ComposeStartup ClearIdentityListPopup(document.getElementById("msgIdentityPopup")); //Clear the subject - document.getElementById("msgSubject").value = ""; + GetMsgSubjectElement().value = ""; + // be sure to clear the transaction manager for the subject + GetMsgSubjectElement().editor.transactionManager.clear(); SetComposeWindowTitle(); SetContentAndBodyAsUnmodified(); @@ -1380,7 +1383,7 @@ function ComposeStartup(recycled, aParams) } var subjectValue = msgCompFields.subject; - document.getElementById("msgSubject").value = subjectValue; + GetMsgSubjectElement().value = subjectValue; var attachments = msgCompFields.attachmentsArray; if (attachments) @@ -1711,7 +1714,7 @@ function GenericSendMessage( msgType ) if (msgCompFields) { Recipients2CompFields(msgCompFields); - var subject = document.getElementById("msgSubject").value; + var subject = GetMsgSubjectElement().value; msgCompFields.subject = subject; Attachments2CompFields(msgCompFields); @@ -1748,7 +1751,7 @@ function GenericSendMessage( msgType ) {value:0})) { msgCompFields.subject = result.value; - var subjectInputElem = document.getElementById("msgSubject"); + var subjectInputElem = GetMsgSubjectElement(); subjectInputElem.value = result.value; } else @@ -1999,7 +2002,7 @@ function Save() function SaveAsFile(saveAs) { dump("SaveAsFile from XUL\n"); - var subject = document.getElementById('msgSubject').value; + var subject = GetMsgSubjectElement().value; GetCurrentEditor().setDocumentTitle(subject); if (gMsgCompose.bodyConvertible() == nsIMsgCompConvertible.Plain) @@ -2407,7 +2410,7 @@ function AdjustFocus() } else { - element = document.getElementById("msgSubject"); + element = GetMsgSubjectElement(); if (element.value == "") { //dump("XXX focus on subject\n"); element.focus(); @@ -2421,7 +2424,7 @@ function AdjustFocus() function SetComposeWindowTitle() { - var newTitle = document.getElementById('msgSubject').value; + var newTitle = GetMsgSubjectElement().value; /* dump("newTitle = " + newTitle + "\n"); */