зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
57ebb3dc12
Коммит
15d0147b6a
|
@ -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 &&
|
||||
|
|
Загрузка…
Ссылка в новой задаче