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:
ducarroz%netscape.com 2000-06-16 22:17:34 +00:00
Родитель 51b2e47bae
Коммит 4e05518513
1 изменённых файлов: 7 добавлений и 2 удалений

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

@ -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');
}
}
},