Perform autocomplete search even if cursor is not at the end rather than leave stale entries. bug 208871, r=jag, sr=Neil.

This commit is contained in:
ajschult%verizon.net 2006-01-28 01:20:34 +00:00
Родитель 3d2a07b1bb
Коммит 49bf1c8c23
1 изменённых файлов: 4 добавлений и 6 удалений

Просмотреть файл

@ -851,11 +851,7 @@
this.resultsPopup.selectedIndex = null;
this.removeAttribute("noMatchesFound");
// We want to autocomplete only if the user is editing at the end of the text
if (this.mInputElt.selectionEnd >= str.length)
this.mAutoCompleteTimer = setTimeout(this.callListener, this.timeout, this, "startLookup");
else
this.noMatch = true;
this.mAutoCompleteTimer = setTimeout(this.callListener, this.timeout, this, "startLookup");
]]></body>
</method>
@ -1021,7 +1017,9 @@
<parameter name="aResults"/>
<parameter name="aUseFirstMatchIfNoDefault"/>
<body><![CDATA[
if (this.mDefaultMatchFilled) return;
if (this.mInputElt.selectionEnd < this.currentSearchString.length ||
this.mDefaultMatchFilled)
return;
if (!this.mFinishAfterSearch && this.autoFill &&
this.mLastKeyCode != KeyEvent.DOM_VK_BACK_SPACE &&