Skip to content

Commit 2f260ce

Browse files
author
Tomas Kirda
committed
Select hint only if onHint callback specified.
1 parent 16a8223 commit 2f260ce

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/jquery.autocomplete.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,11 +308,12 @@
308308
}
309309
return;
310310
case keys.TAB:
311-
case keys.RETURN:
312-
if (e.which === keys.TAB && that.hint) {
311+
if (that.hint && that.options.onHint) {
313312
that.selectHint();
314313
return;
315314
}
315+
// Fall through to RETURN
316+
case keys.RETURN:
316317
if (that.selectedIndex === -1) {
317318
that.hide();
318319
return;

0 commit comments

Comments
 (0)