2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-11-25 22:27:39 +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; return;
case keys.TAB: case keys.TAB:
case keys.RETURN: if (that.hint && that.options.onHint) {
if (e.which === keys.TAB && that.hint) {
that.selectHint(); that.selectHint();
return; return;
} }
// Fall through to RETURN
case keys.RETURN:
if (that.selectedIndex === -1) { if (that.selectedIndex === -1) {
that.hide(); that.hide();
return; return;