Bug 1141991 - make account wizard update dependent fields also when values of fields are modified via keyboard. r=mkmelin, a=rkent
authoraceman <acelists@atlas.sk>
Sun, 22 Mar 2015 22:50:24 +0100
changeset 25818 f7ff3d2c4596a771df03bf7704c3142aed0f5518
parent 25817 08f97de69ea305a7c635b3869f13b98cbdc0dfb6
child 25819 83e056f26c1a2c911b42f47506753912888c00c7
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin, rkent
bugs1141991
Bug 1141991 - make account wizard update dependent fields also when values of fields are modified via keyboard. r=mkmelin, a=rkent
mailnews/base/prefs/content/accountcreation/emailWizard.js
mailnews/base/prefs/content/accountcreation/emailWizard.xul
--- a/mailnews/base/prefs/content/accountcreation/emailWizard.js
+++ b/mailnews/base/prefs/content/accountcreation/emailWizard.js
@@ -1273,23 +1273,23 @@ EmailConfigWizard.prototype =
    * This changes only the UI. The values are read in getUserConfig().
    */
   onChangedOutgoingDropdown : function()
   {
     var menulist = e("outgoing_hostname");
     var menuitem = menulist.selectedItem;
     if (menuitem && menuitem.serverKey) {
       // an existing server has been selected from the dropdown
-      menulist.setAttribute("editable", false);
+      menulist.editable = false;
       _hide("outgoing_port");
       _hide("outgoing_ssl");
       _hide("outgoing_authMethod");
     } else {
       // new server, with hostname, port etc.
-      menulist.setAttribute("editable", true);
+      menulist.editable = true;
       _show("outgoing_port");
       _show("outgoing_ssl");
       _show("outgoing_authMethod");
     }
 
     this.onChangedManualEdit();
   },
 
--- a/mailnews/base/prefs/content/accountcreation/emailWizard.xul
+++ b/mailnews/base/prefs/content/accountcreation/emailWizard.xul
@@ -14,17 +14,17 @@
   %acDTD;
 ]>
 
 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         id="autoconfigWizard"
         windowtype="mail:autoconfig"
         title="&autoconfigWizard.title;"
         onload="gEmailConfigWizard.onLoad();"
-        onkeypress="gEmailConfigWizard.onKeyDown(event)"
+        onkeypress="gEmailConfigWizard.onKeyDown(event);"
         onclose="gEmailConfigWizard.onWizardShutdown();"
         onunload="gEmailConfigWizard.onWizardShutdown();"
         >
 
   <stringbundleset>
     <stringbundle id="bundle_brand"
           src="chrome://branding/locale/brand.properties"/>
     <stringbundle id="strings"
@@ -260,49 +260,50 @@
             <label value="&ssl.label;" class="columnHeader"/>
             <label value="&auth.label;" class="columnHeader"/>
           </row>
           <row id="incoming_server_area" align="center">
             <label class="textbox-label"
                    value="&incoming.label;"
                    control="incoming_hostname"/>
             <menulist id="incoming_protocol"
+                      oncommand="gEmailConfigWizard.onChangedProtocolIncoming();"
                       sizetopopup="always">
-              <menupopup
-              onpopuphidden="gEmailConfigWizard.onChangedProtocolIncoming();">
+              <menupopup>
                 <menuitem label="&imap.label;" value="1"/>
                 <menuitem label="&pop3.label;" value="2"/>
               </menupopup>
             </menulist>
             <textbox id="incoming_hostname"
                      oninput="gEmailConfigWizard.onInputHostname();"
                      class="host uri-element"/>
             <menulist id="incoming_port"
                       editable="true"
                       oninput="gEmailConfigWizard.onChangedPortIncoming();"
+                      oncommand="gEmailConfigWizard.onChangedPortIncoming();"
                       class="port">
-              <menupopup
-                    onpopuphidden="gEmailConfigWizard.onChangedPortIncoming();"/>
+              <menupopup/>
             </menulist>
             <menulist id="incoming_ssl"
                       class="security"
+                      oncommand="gEmailConfigWizard.onChangedSSLIncoming();"
                       sizetopopup="always">
-              <menupopup
-                  onpopuphidden="gEmailConfigWizard.onChangedSSLIncoming();">
+              <menupopup>
                 <!-- values defined in nsMsgSocketType -->
                 <menuitem label="&autodetect.label;" value="0"/>
                 <menuitem label="&noEncryption.label;" value="1"/>
                 <menuitem label="&starttls.label;" value="3"/>
                 <menuitem label="&sslTls.label;" value="2"/>
               </menupopup>
             </menulist>
             <menulist id="incoming_authMethod"
                       class="auth"
+                      oncommand="gEmailConfigWizard.onChangedInAuth();"
                       sizetopopup="always">
-              <menupopup onpopuphidden="gEmailConfigWizard.onChangedInAuth();">
+              <menupopup>
                 <menuitem label="&autodetect.label;" value="0"/>
                 <!-- values defined in nsMsgAuthMethod -->
                 <!-- labels set from messenger.properties
                      to avoid duplication -->
                 <menuitem id="in-authMethod-password-cleartext" value="3"/>
                 <menuitem id="in-authMethod-password-encrypted" value="4"/>
                 <menuitem id="in-authMethod-kerberos" value="5"/>
                 <menuitem id="in-authMethod-ntlm" value="6"/>
@@ -314,44 +315,45 @@
                    value="&outgoing.label;"
                    control="outgoing_hostname"/>
             <label id="outgoing_protocol"
                    value="&smtp.label;"/>
             <menulist id="outgoing_hostname"
                 editable="true"
                 sizetopopup="none"
                 oninput="gEmailConfigWizard.onInputHostname();"
-                onpopuphidden="gEmailConfigWizard.onChangedOutgoingDropdown();"
+                oncommand="gEmailConfigWizard.onChangedOutgoingDropdown();"
                 onpopupshowing="gEmailConfigWizard.onOpenOutgoingDropdown();"
                 class="host uri-element">
               <menupopup id="outgoing_hostname_popup"/>
             </menulist>
             <menulist id="outgoing_port"
                       editable="true"
                       oninput="gEmailConfigWizard.onChangedPortOutgoing();"
+                      oncommand="gEmailConfigWizard.onChangedPortOutgoing();"
                       class="port">
-              <menupopup
-                    onpopuphidden="gEmailConfigWizard.onChangedPortOutgoing();"/>
+              <menupopup/>
             </menulist>
             <menulist id="outgoing_ssl"
                       class="security"
+                      oncommand="gEmailConfigWizard.onChangedSSLOutgoing();"
                       sizetopopup="always">
-              <menupopup
-                    onpopuphidden="gEmailConfigWizard.onChangedSSLOutgoing();">
+              <menupopup>
                 <!-- @see incoming -->
                 <menuitem label="&autodetect.label;" value="0"/>
                 <menuitem label="&noEncryption.label;" value="1"/>
                 <menuitem label="&starttls.label;" value="3"/>
                 <menuitem label="&sslTls.label;" value="2"/>
               </menupopup>
             </menulist>
             <menulist id="outgoing_authMethod"
                       class="auth"
+                      oncommand="gEmailConfigWizard.onChangedOutAuth(this.selectedItem);"
                       sizetopopup="always">
-              <menupopup onpopuphidden="gEmailConfigWizard.onChangedOutAuth(this.parentNode.selectedItem);">
+              <menupopup>
                 <menuitem label="&autodetect.label;" value="0"/>
                 <!-- @see incoming -->
                 <menuitem id="out-authMethod-no" value="1"/>
                 <menuitem id="out-authMethod-password-cleartext" value="3"/>
                 <menuitem id="out-authMethod-password-encrypted" value="4"/>
                 <menuitem id="out-authMethod-kerberos" value="5"/>
                 <menuitem id="out-authMethod-ntlm" value="6"/>
               </menupopup>