Closed Bug 271730 Opened 20 years ago Closed 12 years ago

UI elements/widgets/controls in compose window should be disabled while the message is being sent (e.g. send button, options menu and attachments pane still wrongly enabled)

Categories

(Thunderbird :: Message Compose Window, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 19.0

People

(Reporter: aceman, Assigned: aceman)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Attachments

(2 files, 4 obsolete files)

User-Agent:       Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
Build Identifier: Mozilla 1.7.3

.

Reproducible: Always
Steps to Reproduce:
1.Compose a message
2.Click send
3.The progress bar window appears
4.Click into the compose window
Actual Results:  
The widgets (e.g. the sender selection box) are active and can be used.


Expected Results:  
The compose window should be disabled and do not allow the user to do anything 
to the message, while the sending is in progress.

I see this in Mozilla 1.7.3, but I couldn't find a better component than this. 
The new bugzilla categorization is strange.
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → EXPIRED
I can still reproduce this with thunderbird 2.0.0.16. I don't know how serious it is. The widgets are still functional, but selecting many "dangerous" actions does nothing. E.g. clicking "attach file" does nothing. But "save attachment" seems to work, opens save file dialog. On the other hand I found a problematic case: when the message sending was at 100% I hit "save as draft". That popped up a progress bar of "copying message" which did spin forever. Nevertheless, the message was sent correctly and stored in the sent messages folder.
Severity: minor → normal
Status: RESOLVED → UNCONFIRMED
OS: Windows 98 → All
QA Contact: message-compose
Resolution: EXPIRED → ---
Version: unspecified → Trunk
I forgot to add, that I had to 'cancel' the spinning dialog and then nothing was copied to the drafs folder.
Roberto, do you also see this bug?

xref bug 461425 - while sending a message I still can attach files.
Assignee: mscott → nobody
Absolutely YES, I confirm reproductibility of Bug 271730, with Thunderbird version 2.0.0.21 (20090302) Italian, under VISTA X64 OS (and 6Gigabytes of DDR3 RAM :-) 

I tested it by adding a big attachment to a message, so I had enough time to test the widgets while sending the message.
The results are : I can still change the "security" status of the message, with unpredictable results, I think. I can change the option "sign the message", or "encrypt the message". I can also press the save button, and the save dialog box shows up.

I can also still change the signature with the button of the "signature swith" add-on, and the signature seems to change on the fly, don't know with which results on the actual sent message.

I confirm that I can still add new attachments to the message while the message is already in the "sending phase"!

TIP:Under the file menu, if I press "close" (or "exit" in english, I use the italian version of thunderbird) while yet sending a message, a correct dialog box shows up alerting me that the message is in "sending phase", therefore if I close it then it would not be sent correctly.

thanks for letting me help to Thunderbird development.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.4) Gecko/20100608 Lightning/1.0b2 Thunderbird/3.1

confirming for 3.1rc2
with same symptoms as in comment 6, it's unpredictable what will happen when user changes the mail *while* sending...
Status: UNCONFIRMED → NEW
Ever confirmed: true
Hardware: x86 → All
Depends on: 99185
Summary: Widgets in the compose window should be disabled while the message is being sent → UI elements/widgets/controls in compose window should be disabled while the message is being sent (e.g. send button, options menu and attachments pane still wrongly enabled)
Is it possible to set "disabled" state on the whole window? ;)
This could be made a bit better by fixing some items. Many already base their .isEnabled on the state of !gWindowLock, that is set to true when a send/save is in progress. But many of them do not because they come from various overlays that know nothing about gWindowLock and so their .isEnabled function does not take it into account.

It is possible to unconditionally disable all 'command' elements and all elements with 'oncommand'. But then there is the problem when the send is cancelled how to enable them again. 'command's can be run through doUpdateCommand(), but I don't know what to do with the others. Refactoring all the items to use commands would be a big task and still does not catch all the overlays.

I'll need to find out some other tricks.
I mean the difficulty stems from the fact that gWindowLock facility probably wanted to achieve to allow us to selectively disable only dangerous items and leave others enabled (think Help, Prefs, Account settings, Address book). But then it does not cover overlayed items that don't get disabled.

But if bwinton/mkmelin accepts a solution that we just forcefully disable ALL menuitems+toolbabuttons (we could have enumerated exceptions, e.g. Help menu), storing their state and restore the state after send then I do not need the .isEnabled to work properly (even to exist). The we could just kill the gWindowLock facility.

What do you think?
Assignee: nobody → acelists
Attached patch WIP patch (obsolete) — Splinter Review
So I am almost done with a WIP patch for my proposal. I could not completely remove gWindowLock, because some of the widgets still respond to clicks (e.g. the attachmentlist) even when disabled. So I've left it in so that their .isEnabled() returns false when we are in the lock mode. 
I couldn't disable the 2 text dropdowns (on HTML toolbar), they have oncommand on menupopup, not menulist...

Another thing missing is the disabling of the <editor> element, the main message body. That one doesn't have a 'disabled' property and still can be edited while the save/send progress dialog is up. It even enables buttons like Copy when a part of the text is selected. What solution would you propose for this?
As a brutal hack I collapse the editor while sending. But we need to refine that to not scare the user much :)
Attachment #668792 - Flags: ui-review?(bwinton)
Attachment #668792 - Flags: feedback?(mkmelin+mozilla)
Status: NEW → ASSIGNED
I added all the available buttons from the palette. This also shows how the editor turns out when collapsed (it just gets grey and empty).
Attachment #668796 - Flags: feedback?(bwinton)
Attachment #668796 - Attachment is patch: false
Attachment #668796 - Attachment mime type: text/plain → image/png
Blocks: 431217
Comment on attachment 668792 [details] [diff] [review]
WIP patch

Steal
Attachment #668792 - Flags: ui-review?(bwinton) → ui-review?(mconley)
Comment on attachment 668796 [details]
screenshot of disabled compose window

That seems okay.  I don't think we want to collapse the editor, though.  The XUL editor page (https://developer.mozilla.org/en-US/docs/XUL/editor) makes me wonder if we can use "editor.contentDocument.designMode = 'off';" to prevent editing…

Other than that, it seems reasonable to me.  f+
Attachment #668796 - Flags: feedback?(bwinton) → feedback+
Comment on attachment 668792 [details] [diff] [review]
WIP patch

Review of attachment 668792 [details] [diff] [review]:
-----------------------------------------------------------------

Seems to have bitrotten.
Attachment #668792 - Flags: feedback?(mkmelin+mozilla)
Yes, the patch will be changed to not collapse the editor. See bug 798833, Neil says the editor should already get disabled (readonly) but it has a bug.
Depends on: 798833
No longer depends on: 99185
See Also: → 99185
Attached patch patch v2 (obsolete) — Splinter Review
Attachment #668792 - Attachment is obsolete: true
Attachment #668792 - Flags: ui-review?(mconley)
Attachment #672878 - Flags: ui-review?(bwinton)
Attachment #672878 - Flags: review?(mkmelin+mozilla)
Comment on attachment 672878 [details] [diff] [review]
patch v2

Review of attachment 672878 [details] [diff] [review]:
-----------------------------------------------------------------

::: mail/components/compose/content/MsgComposeCommands.js
@@ +169,5 @@
> + * The elements to operate on are marked with the "disableonsend" attribute.
> + * This includes elements like the address list, attachment list, subject
> + * and message body.
> + *
> + * @param aLock  True = disable items. False = enable items.

True and False lowercase (here and elsewhere)

@@ +171,5 @@
> + * and message body.
> + *
> + * @param aLock  True = disable items. False = enable items.
> + */
> +function updateEditableFields(aLock)

Instead of aLock, why not use a more descriptive name, like aDisable

@@ +892,5 @@
> + */
> +function updateAllItems(aLock)
> +{
> +  let commandItems = [];
> +  appendNodes(document.getElementsByTagName("menu"), commandItems);

Relying on function side effects on in-parameters isn't good style in JavaScript.

I think appendNodes is ugly and not needed. Maybe you can use array forEach or something for the results to make it short and clean...
Attachment #672878 - Flags: review?(mkmelin+mozilla) → review-
document.getElementsByTagName() returns an HTMLCollection, not an array, so it does not have the array functions.
Attached patch patch v3 (obsolete) — Splinter Review
But let's try an array of HTMLCollections.
Attachment #672878 - Attachment is obsolete: true
Attachment #672878 - Flags: ui-review?(bwinton)
Attachment #673633 - Flags: ui-review?(bwinton)
Attachment #673633 - Flags: review?(mkmelin+mozilla)
Comment on attachment 673633 [details] [diff] [review]
patch v3

Review of attachment 673633 [details] [diff] [review]:
-----------------------------------------------------------------

This looks better! r=mkmelin

::: mail/components/compose/content/MsgComposeCommands.js
@@ +899,5 @@
> +          if (!commandItem.hasAttribute("stateBeforeSend")) {
> +            commandItem.setAttribute("stateBeforeSend", commandItem.disabled);
> +            commandItem.disabled = true;
> +          }
> +        } else {

else on new line
Attachment #673633 - Flags: review?(mkmelin+mozilla) → review+
Attached patch patch v4 (obsolete) — Splinter Review
Attachment #673633 - Attachment is obsolete: true
Attachment #673633 - Flags: ui-review?(bwinton)
Attachment #673686 - Flags: ui-review?(bwinton)
Comment on attachment 673686 [details] [diff] [review]
patch v4

># HG changeset patch
># Parent dee6670c667f5906eee09fa3f441729a1f19f45a
># User aceman <acelists@atlas.sk>
>Bug 271730 - Disable all UI elements while a message is being sent/saved in the compose window. r=mkmelin, ui-r=bwinton
>
>diff --git a/mail/components/compose/content/MsgComposeCommands.js b/mail/components/compose/content/MsgComposeCommands.js
>--- a/mail/components/compose/content/MsgComposeCommands.js
>+++ b/mail/components/compose/content/MsgComposeCommands.js
>@@ -159,32 +159,34 @@ function ReleaseGlobalVariables()
>     gLDAPSession = null;
>     Components.utils.forceGC();
>   }
>   gCharsetConvertManager = null;
>   gMsgCompose = null;
>   gMailSession = null;
> }
> 
>-function disableEditableFields()
>+/**
>+ * Disables or enables editable elements in the window.
>+ * The elements to operate on are marked with the "disableonsend" attribute.
>+ * This includes elements like the address list, attachment list, subject
>+ * and message body.
>+ *
>+ * @param aDisable  true = disable items. false = enable items.
>+ */
>+function updateEditableFields(aDisable)
> {
>-  gMsgCompose.editor.flags |= nsIPlaintextEditorMail.eEditorReadonlyMask;
>-  var disableElements = document.getElementsByAttribute("disableonsend", "true");
>-  for (let i = 0; i < disableElements.length; i++)
>-    disableElements[i].setAttribute('disabled', 'true');
>-
>-}
>-
>-function enableEditableFields()
>-{
>-  gMsgCompose.editor.flags &= ~nsIPlaintextEditorMail.eEditorReadonlyMask;
>-  var enableElements = document.getElementsByAttribute("disableonsend", "true");
>-  for (let i = 0; i < enableElements.length; i++)
>-    enableElements[i].removeAttribute('disabled');
>-
>+  if (aDisable)
>+    gMsgCompose.editor.flags |= nsIPlaintextEditorMail.eEditorReadonlyMask;
>+  else
>+    gMsgCompose.editor.flags &= ~nsIPlaintextEditorMail.eEditorReadonlyMask;
>+
>+  let elements = document.getElementsByAttribute("disableonsend", "true");
>+  for (let i = 0; i < elements.length; i++)
>+    elements[i].disabled = aDisable;
> }
> 
> var gComposeRecyclingListener = {
>   onClose: function() {
>     //Reset recipients and attachments
>     ReleaseAutoCompleteState();
>     awResetAllRows();
>     RemoveAllAttachments();
>@@ -195,17 +197,17 @@ var gComposeRecyclingListener = {
> 
>     //Clear the subject
>     GetMsgSubjectElement().value = "";
>     // be sure to clear the transaction manager for the subject
>     GetMsgSubjectElement().editor.transactionManager.clear();
>     SetComposeWindowTitle();
> 
>     SetContentAndBodyAsUnmodified();
>-    disableEditableFields();
>+    updateEditableFields(true);
>     ReleaseGlobalVariables();
> 
>     // Clear the focus
>     awGetInputElement(1).removeAttribute('focused');
> 
>     //Reset Boxes size
>     document.getElementById("headers-box").removeAttribute("height");
>     document.getElementById("appcontent").removeAttribute("height");
>@@ -268,19 +270,17 @@ var stateListener = {
> 
>   NotifyComposeBodyReady: function() {
>     if (gMsgCompose.composeHTML)
>       loadHTMLMsgPrefs();
>     AdjustFocus();
>   },
> 
>   ComposeProcessDone: function(aResult) {
>-    gWindowLocked = false;
>-    enableEditableFields();
>-    updateComposeItems();
>+    ToggleWindowLock(false);
> 
>     if (aResult== Components.results.NS_OK)
>     {
>       if (!gAutoSaving)
>         SetContentAndBodyAsUnmodified();
> 
>       if (gCloseWindowAfterSave)
>       {
>@@ -863,21 +863,63 @@ function updateComposeItems()
>       goUpdateCommand("cmd_indent");
>       goUpdateCommand("cmd_outdent");
>       goUpdateCommand("cmd_align");
>       goUpdateCommand("cmd_smiley");
>     }
> 
>     // Options Menu
>     goUpdateCommand("cmd_spelling");
>+
>     // Workaround to update 'Quote' toolbar button. (See bug 609926.)
>     goUpdateCommand("cmd_quoteMessage");
>   } catch(e) {}
> }
> 
>+/**
>+ * Disables or restores all toolbar items (menus/buttons) in the window.
>+ *
>+ * @param aDisable  true = disable all items. false = restore items to the state
>+ *                  stored before disabling them.
>+ */
>+function updateAllItems(aDisable)
>+{
>+  // This array will contain HTMLCollection objects as members.
>+  let commandItemCollections = [];
>+  commandItemCollections.push(document.getElementsByTagName("menu"));
>+  commandItemCollections.push(document.getElementsByTagName("toolbarbutton"));
>+  commandItemCollections.push(document.getElementsByAttribute("command", "*"));
>+  commandItemCollections.push(document.getElementsByAttribute("oncommand", "*"));
>+  for each (let itemCollection in commandItemCollections) {
>+    for (let item = 0; item < itemCollection.length; item++) {
>+      let commandItem = itemCollection[item];
>+      if ("disabled" in commandItem) {
>+        if (aDisable) {
>+          // Any element can appear multiple times in the commandItemCollections
>+          // list so only act on it if we didn't already set the "stateBeforeSend"
>+          // attribute on previous visit.
>+          if (!commandItem.hasAttribute("stateBeforeSend")) {
>+            commandItem.setAttribute("stateBeforeSend", commandItem.disabled);
>+            commandItem.disabled = true;
>+          }
>+        }
>+        else {
>+          // Any element can appear multiple times in the commandItemCollections
>+          // list so only act on it if it still has the "stateBeforeSend"
>+          // attribute.
>+          if (commandItem.hasAttribute("stateBeforeSend")) {
>+            commandItem.disabled = commandItem.getAttribute("stateBeforeSend") == "true";
>+            commandItem.removeAttribute("stateBeforeSend");
>+          }
>+        }
>+      }
>+    }
>+  }
>+}
>+
> function openEditorContextMenu(popup)
> {
>   gSpellChecker.clearSuggestionsFromMenu();
>   gSpellChecker.initFromEvent(document.popupRangeParent, document.popupRangeOffset);
>   var onMisspelling = gSpellChecker.overMisspelling;
>   document.getElementById('spellCheckSuggestionsSeparator').hidden = !onMisspelling;
>   document.getElementById('spellCheckAddToDictionary').hidden = !onMisspelling;
>   document.getElementById('spellCheckIgnoreWord').hidden = !onMisspelling;
>@@ -1798,20 +1840,30 @@ function DoCommandClose()
> 
> function DoCommandPrint()
> {
>   try {
>     PrintUtils.print();
>   } catch(ex) {dump("#PRINT ERROR: " + ex + "\n");}
> }
> 
>-function ToggleWindowLock()
>+/**
>+ * Locks/Unlocks the window widgets while a message is being saved/sent.
>+ * Locking means to disable all possible items in the window so that
>+ * the user can't click/activate anything.
>+ *
>+ * @param aDisable  true = lock the window. false = unlock the window.
>+ */
>+function ToggleWindowLock(aDisable)
> {
>-  gWindowLocked = !gWindowLocked;
>-  updateComposeItems();
>+  gWindowLocked = aDisable;
>+  updateAllItems(aDisable);
>+  updateEditableFields(aDisable);
>+  if (!aDisable)
>+    updateComposeItems();
> }
> 
> /* This function will go away soon as now arguments are passed to the window using a object of type nsMsgComposeParams instead of a string */
> function GetArgs(originalData)
> {
>   var args = new Object();
> 
>   if (originalData == "")
>@@ -1884,17 +1936,17 @@ function ComposeFieldsReady()
>           = gMsgCompose.wrapLength;
>     }
>     catch (e) {
>       dump("### textEditor.wrapWidth exception text: " + e + " - failed\n");
>     }
>   }
>   CompFields2Recipients(gMsgCompose.compFields);
>   SetComposeWindowTitle();
>-  enableEditableFields();
>+  updateEditableFields(false);
> }
> 
> // checks if the passed in string is a mailto url, if it is, generates nsIMsgComposeParams
> // for the url and returns them.
> function handleMailtoArgs(mailtoUrl)
> {
>   // see if the string is a mailto url....do this by checking the first 7 characters of the string
>   if (/^mailto:/i.test(mailtoUrl))
>@@ -2812,23 +2864,21 @@ function GenericSendMessage(msgType)
>     event.initEvent("compose-send-message", false, true);
>     var msgcomposeWindow = document.getElementById("msgcomposeWindow");
>     msgcomposeWindow.setAttribute("msgtype", msgType);
>     msgcomposeWindow.dispatchEvent(event);
>     if (event.defaultPrevented)
>       throw Components.results.NS_ERROR_ABORT;
> 
>     gAutoSaving = (msgType == nsIMsgCompDeliverMode.AutoSaveAsDraft);
>+
>     // disable the ui if we're not auto-saving
>     if (!gAutoSaving)
>-    {
>-      gWindowLocked = true;
>-      disableEditableFields();
>-      updateComposeItems();
>-    }
>+      ToggleWindowLock(true);
>+
>     // 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();
>     }
> 
>@@ -2841,19 +2891,17 @@ function GenericSendMessage(msgType)
>     }
>     msgWindow.domWindow = window;
>     msgWindow.rootDocShell.allowAuth = true;
>     gMsgCompose.SendMsg(msgType, getCurrentIdentity(),
>                         getCurrentAccountKey(), msgWindow, progress);
>   }
>   catch (ex) {
>     Components.utils.reportError("GenericSendMessage FAILED: " + ex);
>-    gWindowLocked = false;
>-    enableEditableFields();
>-    updateComposeItems();
>+    ToggleWindowLock(false);
>   }
>   if (gMsgCompose && originalCharset != gMsgCompose.compFields.characterSet)
>     SetDocumentCharacterSet(gMsgCompose.compFields.characterSet);
> }
> 
> function CheckValidEmailAddress(to, cc, bcc)
> {
>   var invalidStr = null;
>diff --git a/mail/components/compose/content/addressingWidgetOverlay.js b/mail/components/compose/content/addressingWidgetOverlay.js
>--- a/mail/components/compose/content/addressingWidgetOverlay.js
>+++ b/mail/components/compose/content/addressingWidgetOverlay.js
>@@ -425,17 +425,17 @@ function awDeleteRow(rowToDelete)
>   for (var row = rowToDelete + 1; row <= maxRecipients; row ++)
>     awSetInputAndPopupId(awGetInputElement(row), awGetPopupElement(row), (row-1));
> 
>   awTestRowSequence();
> }
> 
> function awClickEmptySpace(target, setFocus)
> {
>-  if (target == null ||
>+  if (document.getElementById("addressCol2#1").disabled || target == null ||
>       (target.localName != "listboxbody" &&
>       target.localName != "listcell" &&
>       target.localName != "listitem"))
>     return;
> 
>   var lastInput = awGetInputElement(top.MAX_RECIPIENTS);
> 
>   if ( lastInput && lastInput.value )
>diff --git a/mail/components/compose/content/messengercompose.xul b/mail/components/compose/content/messengercompose.xul
>--- a/mail/components/compose/content/messengercompose.xul
>+++ b/mail/components/compose/content/messengercompose.xul
>@@ -95,16 +95,17 @@
>               oncommandupdate="goUpdatePasteMenuItems()"/>
> 
>   <commandset id="commonEditorMenuItems"/>
>   <commandset id="composerMenuItems"/>
>   <commandset id="composerEditMenuItems"/>
>   <commandset id="composerStyleMenuItems"/>
>   <commandset id="composerTableMenuItems"/>
>   <commandset id="composerListMenuItems"/>
>+
>   <!-- File Menu -->
>   <command id="cmd_new" oncommand="goDoCommand('cmd_newMessage')"/>
>   <command id="cmd_attachFile" oncommand="goDoCommand('cmd_attachFile')"/>
>   <command id="cmd_attachCloud" oncommand="attachToCloud(event.target.cloudProvider); event.stopPropagation();"/>
>   <command id="cmd_attachPage" oncommand="goDoCommand('cmd_attachPage')"/>
>   <command id="cmd_attachVCard" checked="false" oncommand="ToggleAttachVCard(event.target)"/>
>   <command id="cmd_close" oncommand="goDoCommand('cmd_close')"/>
>   <command id="cmd_saveDefault" oncommand="goDoCommand('cmd_saveDefault')"/>
>@@ -737,17 +738,17 @@
>                    command="cmd_copy"
>                    tooltiptext="&copyButton.tooltip;"/>
>     <toolbarbutton id="paste-button" class="toolbarbutton-1"
>                    label="&pasteCmd.label;"
>                    command="cmd_paste"
>                    tooltiptext="&pasteButton.tooltip;"/>
> 
>     <toolbaritem id="priority-button" align="center" pack="center">
>-      <label value="&priorityButton.label;"/>
>+      <label value="&priorityButton.label;" control="priorityMenu-button"/>
>       <menulist id="priorityMenu-button" value="Normal" oncommand="PriorityMenuSelect(event.target);">
>         <menupopup id="priorityMenu-buttonPopup">
>           <menuitem name="priority" label="&highestPriorityCmd.label;" value="Highest"  id="list_priotity_highest"/>
>           <menuitem name="priority" label="&highPriorityCmd.label;"    value="High"     id="list_priority_high"/>
>           <menuitem name="priority" label="&normalPriorityCmd.label;"  value="Normal"   id="list_priority_normal"/>
>           <menuitem name="priority" label="&lowPriorityCmd.label;"     value="Low"      id="list_priority_low"/>
>           <menuitem name="priority" label="&lowestPriorityCmd.label;"  value="Lowest"   id="list_priority_lowest"/>
>         </menupopup>
>@@ -792,23 +793,25 @@
>              ondragdrop="nsDragAndDrop.drop(event, envelopeDragObserver);"
>              ondragexit="nsDragAndDrop.dragExit(event, envelopeDragObserver);">
>       <hbox id="msgheaderstoolbar-box" flex="1">
>         <vbox flex="1" id="addresses-box">
>           <hbox id="top-gradient-box">
>             <hbox align="center" pack="end" style="&headersSpace.style;">
>               <label value="&fromAddr.label;" accesskey="&fromAddr.accesskey;" control="msgIdentity"/>
>             </hbox>
>-            <menulist id="msgIdentity" type="description" flex="1" oncommand="LoadIdentity(false);">
>+            <menulist id="msgIdentity" type="description" flex="1"
>+                      oncommand="LoadIdentity(false);" disableonsend="true">
>               <menupopup id="msgIdentityPopup"/>
>             </menulist>
>           </hbox>
>           <listbox id="addressingWidget" flex="1" seltype="multiple" rows="4"
>                    onkeydown="awKeyDown(event, this)"
>-                   onclick="awClickEmptySpace(event.originalTarget, true)">
>+                   onclick="awClickEmptySpace(event.originalTarget, true)"
>+                   disableonsend="true">
>             <listcols>
>               <listcol id="typecol-addressingWidget" style="&headersSpace.style;"/>
>               <listcol id="textcol-addressingWidget" flex="1"/>
>             </listcols>
>             <listitem class="addressingWidgetItem" allowevents="true">
>               <listcell class="addressingWidgetCell" align="stretch">
>                 <menulist id="addressCol1#1" disableonsend="true"
>                           class="aw-menulist menulist-compact" flex="1"
>@@ -853,16 +856,17 @@
>         <splitter id="attachmentbucket-sizer" collapsed="true" collapse="after"/>
>         <vbox id="attachments-box" collapsed="true" persist="width">
>           <hbox>
>             <label id="attachmentBucketCount" control="attachmentBucket"
>                    crop="right" accesskey="&attachments.accesskey;" flex="1"/>
>             <label id="attachmentBucketSize"/>
>           </hbox>
>           <attachmentlist orient="vertical" id="attachmentBucket"
>+                          disableonsend="true"
>                           seltype="multiple" flex="1" height="0"
>                           context="msgComposeAttachmentListContext"
>                           itemcontext="msgComposeAttachmentItemContext"
>                           onclick="AttachmentBucketClicked(event);"
>                           ondraggesture="nsDragAndDrop.startDrag(event, attachmentBucketDNDObserver);"/>
>         </vbox>
>       </hbox>
>     </toolbar>
Attachment #673686 - Flags: ui-review?(bwinton) → ui-review+
Ugh, bugzilla sucks.

The gist of what I was trying to write is "ui-r=me, if you also disable the HTML formatting controls."

Thanks,
Blake.
Attached patch patch v5Splinter Review
These were a bit more questionable changes so please look at those parts again.

I fixed the 2 font formatting menus (moving the oncommand from menupopup up to menulist, but it seems to still work). - for mkmelin

And also the color picker icons (3rd item on the HTML toolbar). That one was hard, it isn't disabled even when the whole toolbar is (e.g. when cursor is not in the msg body), but that is for a different bug. But I added some new disabled style for it in the themes. - for bwinton
Attachment #673686 - Attachment is obsolete: true
Attachment #674262 - Flags: ui-review?(bwinton)
Attachment #674262 - Flags: review?(mkmelin+mozilla)
Comment on attachment 674262 [details] [diff] [review]
patch v5

Review of attachment 674262 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good! r=mkmelin
Attachment #674262 - Flags: review?(mkmelin+mozilla) → review+
Comment on attachment 674262 [details] [diff] [review]
patch v5

ui-r=me, and thank you for this!

One thing I noticed, though, was that the toolbar was re-enabled for the "Saving to sent folder" step.  That seemed odd, and if you could fix that too, I'ld appreciate it.  (But if you wanted to do it in a separate bug, I'ld be fine with that, too.  ;)

Thanks,
Blake.
Attachment #674262 - Flags: ui-review?(bwinton) → ui-review+
I have not noticed such a "Saving to sent folder" step. When does it happen? Is it on IMAP server?
After sending.  Yes.

The message comes from mxr.mozilla.org/comm-central/source/mail/locales/en-US/chrome/messenger/messengercompose/composeMsgs.properties#112  Hopefully you can track back the usage of that identifier, to see where it's getting called.  :)

Thanks,
Blake.
It seems to be loaded here:
http://mxr.mozilla.org/comm-central/source/mailnews/compose/src/nsMsgSend.cpp#4518

A completely different c++ file where I do not know how to hook into. Off to a new bug :)
Keywords: checkin-needed
Blocks: 806535
https://hg.mozilla.org/comm-central/rev/1829954844d1
Status: ASSIGNED → RESOLVED
Closed: 19 years ago12 years ago
Flags: in-testsuite-
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 19.0
Blocks: 528793
You need to log in before you can comment on or make changes to this bug.