Bug 1272505 - rename handleKeyPress() in maillist list editor to not clash with the function in autocomplete.xml. r=jorgk, r=Ratty a=rkent (no suite changes)
--- 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))