mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 21:05:36 +00:00
Fix for bug 37628. Do not autocomplete newsgroup and followup-to
This commit is contained in:
parent
63c67fc0a1
commit
cb30cd0734
@ -77,7 +77,6 @@ function Recipients2CompFields(msgCompFields)
|
||||
{
|
||||
fieldValue = inputField.value;
|
||||
fieldValue2 = inputField.getAttribute("value");
|
||||
dump("AW: inputField=" + inputField + ", fieldValue=" + fieldValue + ", fieldValue2=" + fieldValue2 + "\n");
|
||||
if (fieldValue != "")
|
||||
{
|
||||
switch (awGetPopupElement(i).selectedItem.getAttribute("data"))
|
||||
@ -163,6 +162,8 @@ function _awSetInputAndPopup(inputValue, popupValue, parentNode, templateNode)
|
||||
{
|
||||
select[0].selectedItem = select[0].childNodes[0].childNodes[awGetSelectItemIndex(popupValue)];
|
||||
select[0].setAttribute("id", "msgRecipientType#" + top.MAX_RECIPIENTS);
|
||||
if (input)
|
||||
_awDisableAutoComplete(select[0], input[0]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -262,6 +263,8 @@ function awAppendNewRow(setFocus)
|
||||
{
|
||||
select[0].selectedItem = select[0].childNodes[0].childNodes[awGetSelectItemIndex(lastRecipientType)];
|
||||
select[0].setAttribute("id", "msgRecipientType#" + top.MAX_RECIPIENTS);
|
||||
if (input)
|
||||
_awDisableAutoComplete(select[0], input[0]);
|
||||
}
|
||||
|
||||
// focus on new input widget
|
||||
@ -513,3 +516,17 @@ function DropRecipient(recipient)
|
||||
lastInput.value = recipient;
|
||||
awAppendNewRow(true);
|
||||
}
|
||||
|
||||
function _awDisableAutoComplete(selectElem, inputElem)
|
||||
{
|
||||
if (selectElem.data == 'addr_newsgroups' || selectElem.data == 'addr_followup')
|
||||
inputElem.disableAutocomplete = true;
|
||||
else
|
||||
inputElem.disableAutocomplete = false;
|
||||
}
|
||||
function awDisableAutoComplete(rowNumber)
|
||||
{
|
||||
inputElem = awGetInputElement(rowNumber);
|
||||
selectElem = awGetPopupElement(rowNumber);
|
||||
_awDisableAutoComplete(selectElem, inputElem)
|
||||
}
|
@ -47,7 +47,8 @@ Rights Reserved.
|
||||
<treecell allowevents="true">
|
||||
<menulist id="msgRecipientType#1"
|
||||
onclick="awNotAnEmptyArea(event)"
|
||||
oncommand="contentChanged=true;">
|
||||
oncommand="contentChanged=true;
|
||||
awDisableAutoComplete(this.id.slice(this.id.lastIndexOf('#') + 1));">
|
||||
<menupopup>
|
||||
<menuitem data="addr_to" value="&toAddr.label;"/>
|
||||
<menuitem data="addr_cc" value="&ccAddr.label;"/>
|
||||
|
Loading…
Reference in New Issue
Block a user