Bug 1575046 - Allow users to edit existing mailing lists. r=mkmelin
authorPaul Morris <paul@thunderbird.net>
Fri, 06 Sep 2019 12:14:51 -0400
changeset 36749 3358ca95426cc108feb4416d31e0f6f436650593
parent 36748 1bffbb9820b34158dc96d3c468211cf6d823c71d
child 36750 a904da1f13fe22ae563124444197ccb2c826ba34
push id395
push userclokep@gmail.com
push dateMon, 02 Dec 2019 19:38:57 +0000
bugs1575046, 37435
Bug 1575046 - Allow users to edit existing mailing lists. r=mkmelin If a user opened a saved mailing list (from the address book dialog) and tried to edit or delete one of the addresses, then clicked the OK button, the changes were not saved. Perhaps this was caused by de-XBL changes? The fix was to not set the 'textbox.value' property (as introduced by the fix for bug 37435), since that was preventing that property from updating to what the user typed in. I tested to see if the problem from bug 37435 returned after this change and was not able to reproduce it. All message recipients were sent the message as expected.
--- a/mailnews/addrbook/content/abMailListDialog.js
+++ b/mailnews/addrbook/content/abMailListDialog.js
@@ -329,20 +329,17 @@ function AppendNewRowAndSetFocus() {
 function SetInputValue(inputValue, parentNode, templateNode) {
   var newNode = templateNode.cloneNode(true);
   parentNode.appendChild(newNode); // we need to insert the new node before we set the value of the select element!
   var input = newNode.getElementsByTagName(awInputElementName());
   if (input && input.length == 1) {
-    // We need to set the value using both setAttribute and .value else we will
-    // lose the content when the field is not visible. See bug 37435
     input[0].setAttribute("value", inputValue);
-    input[0].value = inputValue;
     input[0].setAttribute("id", "addressCol1#" + top.MAX_RECIPIENTS);
 function awNotAnEmptyArea(event) {
   // This is temporary until i figure out how to ensure to always having an empty space after the last row
   var lastInput = awGetInputElement(top.MAX_RECIPIENTS);