2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-12-26 12:17:33 +00:00

Select hint only if onHint callback specified.

This commit is contained in:
Tomas Kirda 2013-07-19 08:36:20 +03:00
parent 16a8223db7
commit 2f260cec63

View File

@ -308,11 +308,12 @@
}
return;
case keys.TAB:
case keys.RETURN:
if (e.which === keys.TAB && that.hint) {
if (that.hint && that.options.onHint) {
that.selectHint();
return;
}
// Fall through to RETURN
case keys.RETURN:
if (that.selectedIndex === -1) {
that.hide();
return;