зеркало из https://github.com/mozilla/gecko-dev.git
Fix for bug 41828. Do not autocomplete if the user is not typing at the end of the text. R=mscott
This commit is contained in:
Родитель
51b2e47bae
Коммит
4e05518513
|
@ -355,8 +355,13 @@
|
|||
break;
|
||||
|
||||
default:
|
||||
me.needToAutocomplete = true;
|
||||
me.autoCompleteTimer = setTimeout(me.privatefunc.callListener, me.timeout, me, 'startLookup');
|
||||
/*We want to autocomplete only if the user is editing at the end of the text*/
|
||||
var inputElement = document.getAnonymousNodes(me)[0].firstChild;
|
||||
if (inputElement.selectionEnd >= inputElement.value.length)
|
||||
{
|
||||
me.needToAutocomplete = true;
|
||||
me.autoCompleteTimer = setTimeout(me.privatefunc.callListener, me.timeout, me, 'startLookup');
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче