diff --git a/mailnews/addrbook/src/nsAbAutoCompleteSession.cpp b/mailnews/addrbook/src/nsAbAutoCompleteSession.cpp
index 3d5c6040f0a..7eecabb3756 100644
--- a/mailnews/addrbook/src/nsAbAutoCompleteSession.cpp
+++ b/mailnews/addrbook/src/nsAbAutoCompleteSession.cpp
@@ -646,9 +646,9 @@ NS_IMETHODIMP nsAbAutoCompleteSession::OnStartLookup(const PRUnichar *uSearchStr
status = nsIAutoCompleteStatus::matchFound;
if (addedDefaultItem)
{
- // always make the first search result the default item.
- // if we dont' have any matches then use pos 0 which is the default item....
- results->SetDefaultItemIndex(nbrOfItems > 1 ? 1 : 0);
+ // If we have at least one REAL match then make it the default item. If we don't have any matches,
+ // just the default domain, then don't install a default item index on the widget.
+ results->SetDefaultItemIndex(nbrOfItems > 1 ? 1 : -1);
}
else
results->SetDefaultItemIndex(0);
diff --git a/xpfe/components/autocomplete/resources/content/autocomplete.xml b/xpfe/components/autocomplete/resources/content/autocomplete.xml
index 0f00355d6ac..df227953ec5 100644
--- a/xpfe/components/autocomplete/resources/content/autocomplete.xml
+++ b/xpfe/components/autocomplete/resources/content/autocomplete.xml
@@ -279,6 +279,7 @@
null
null
null
+ false