From 7b81031ad9f5d23f1e8efa3b001f22646a019811 Mon Sep 17 00:00:00 2001 From: aceman Date: Sun, 15 May 2016 00:00:40 +0200 Subject: [PATCH] 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 --HG-- extra : amend_source : b504f10c79453f385283c61569a53144c51077b3 --- mail/components/addrbook/content/abEditListDialog.xul | 2 +- mail/components/addrbook/content/abMailListDialog.xul | 2 +- mailnews/addrbook/content/abMailListDialog.js | 4 ++-- suite/mailnews/addrbook/abListOverlay.xul | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mail/components/addrbook/content/abEditListDialog.xul b/mail/components/addrbook/content/abEditListDialog.xul index 36fccd0fc3..35c7b390dd 100644 --- a/mail/components/addrbook/content/abEditListDialog.xul +++ b/mail/components/addrbook/content/abEditListDialog.xul @@ -62,7 +62,7 @@ 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);"> diff --git a/mail/components/addrbook/content/abMailListDialog.xul b/mail/components/addrbook/content/abMailListDialog.xul index 3d67c256f7..9235e726c0 100644 --- a/mail/components/addrbook/content/abMailListDialog.xul +++ b/mail/components/addrbook/content/abMailListDialog.xul @@ -72,7 +72,7 @@ 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);"> diff --git a/mailnews/addrbook/content/abMailListDialog.js b/mailnews/addrbook/content/abMailListDialog.js index f9d869ae17..e015a0ec26 100644 --- a/mailnews/addrbook/content/abMailListDialog.js +++ b/mailnews/addrbook/content/abMailListDialog.js @@ -27,10 +27,10 @@ function getLoadContext() { .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(); } diff --git a/suite/mailnews/addrbook/abListOverlay.xul b/suite/mailnews/addrbook/abListOverlay.xul index c7b8a06f77..7def577bdf 100644 --- a/suite/mailnews/addrbook/abListOverlay.xul +++ b/suite/mailnews/addrbook/abListOverlay.xul @@ -69,7 +69,7 @@ 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);">