Bug 1272505 - rename handleKeyPress() in maillist list editor to not clash with the function in autocomplete.xml. r=jorgk, r=Ratty, a=Ratty CLOSED TREE a=Ratty comm-release
authoraceman <acelists@atlas.sk>
Sun, 15 May 2016 00:00:40 +0200
changeset 31294 b0ddb02137a7edf140a908349cc4ee5a7c05ec51
parent 31293 4494632520a40c89f226b44948dddd382b80d72e
child 31295 d314c213a6ddae8cdf17532f3b697f7130e38327
push id1
push userclokep@gmail.com
push dateMon, 07 May 2018 22:45:56 +0000
treeherdercomm-esr60@57eacde5ef40 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorgk, Ratty, Ratty, Ratty
bugs1272505
Bug 1272505 - rename handleKeyPress() in maillist list editor to not clash with the function in autocomplete.xml. r=jorgk, r=Ratty, a=Ratty CLOSED TREE a=Ratty comm-release
mail/components/addrbook/content/abEditListDialog.xul
mail/components/addrbook/content/abMailListDialog.xul
mailnews/addrbook/content/abMailListDialog.js
suite/mailnews/addrbook/abListOverlay.xul
--- a/mail/components/addrbook/content/abEditListDialog.xul
+++ b/mail/components/addrbook/content/abEditListDialog.xul
@@ -57,17 +57,17 @@
         <listcell class="addressingWidgetCell">
           <textbox id="addressCol1#1" class="plain textbox-addressingWidget uri-element"
                    type="autocomplete" flex="1"
                    autocompletesearch="addrbook ldap"
                    autocompletesearchparam="{}" timeout="300" maxrows="4"
                    completedefaultindex="true" forcecomplete="true"
                    minresultsforpopup="3"
                    ontextentered="awRecipientTextCommand(param, this)"
-                   onkeypress="handleKeyPress(this, event);"
+                   onkeypress="awHandleKeyPress(this, event);"
                    onkeydown="awRecipientKeyDown(event, this);"
                    onclick="awNotAnEmptyArea(event);">
             <image onclick="this.parentNode.select();" class="person-icon"/>
           </textbox>
         </listcell>
       </listitem>
     </listbox>
   </vbox>
--- a/mail/components/addrbook/content/abMailListDialog.xul
+++ b/mail/components/addrbook/content/abMailListDialog.xul
@@ -67,17 +67,17 @@
         <listcell class="addressingWidgetCell">
           <textbox id="addressCol1#1" class="plain textbox-addressingWidget uri-element"
                    type="autocomplete" flex="1"
                    autocompletesearch="addrbook ldap"
                    autocompletesearchparam="{}" timeout="300" maxrows="4"
                    completedefaultindex="true" forcecomplete="true"
                    minresultsforpopup="3"
                    ontextentered="awRecipientTextCommand(param, this)"
-                   onkeypress="handleKeyPress(this, event);"
+                   onkeypress="awHandleKeyPress(this, event);"
                    onkeydown="awRecipientKeyDown(event, this);"
                    onclick="awNotAnEmptyArea(event);">
             <image onclick="this.parentNode.select();" class="person-icon"/>
           </textbox>
         </listcell>
       </listitem>
     </listbox>
   </vbox>
--- a/mailnews/addrbook/content/abMailListDialog.js
+++ b/mailnews/addrbook/content/abMailListDialog.js
@@ -22,20 +22,20 @@ catch (e)
 
 // Returns the load context for the current window
 function getLoadContext() {
   return window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
                .getInterface(Components.interfaces.nsIWebNavigation)
                .QueryInterface(Components.interfaces.nsILoadContext);
 }
 
-function handleKeyPress(element, event)
+function awHandleKeyPress(element, event)
 {
   // allow dialog to close on enter if focused textbox has no value
-  if (element.value != "" && event.keyCode == 13) {
+  if (element.value != "" && event.keyCode == KeyEvent.DOM_VK_RETURN) {
     event.stopPropagation();
     event.preventDefault();
   }
 }
 
 function mailingListExists(listname)
 {
   if (MailServices.ab.mailListNameExists(listname))
--- a/suite/mailnews/addrbook/abListOverlay.xul
+++ b/suite/mailnews/addrbook/abListOverlay.xul
@@ -64,17 +64,17 @@
                  class="plain textbox-addressingWidget uri-element"
                  type="autocomplete"
                  flex="1"
                  autocompletesearch="addrbook ldap"
                  autocompletesearchparam="{}" timeout="300" maxrows="4"
                  completedefaultindex="true" forcecomplete="true"
                  minresultsforpopup="3"
                  ontextentered="awRecipientTextCommand(eventParam, this)"
-                 onkeypress="handleKeyPress(this, event);"
+                 onkeypress="awHandleKeyPress(this, event);"
                  onkeydown="awRecipientKeyDown(event, this);"
                  onclick="awNotAnEmptyArea(event);">
           <image onclick="awNotAnEmptyArea(event)" class="person-icon"/>
         </textbox>
       </listcell>
     </listitem>
   </listbox>
 </vbox>