typeahead: Tab opens typeahead if not open with a non-empty input.

Fixes part of #10026.
NOTE: The Tab key will select option from typeahead if the typeahead
is already open i.e the same behaviour as Enter.
NOTE: This behaviour applies irrespective of search pills are enabled
or not.
This commit is contained in:
Shubham Padia 2018-08-08 22:01:55 +05:30 committed by Tim Abbott
parent 524ef509fe
commit 0e2c509a24
1 changed files with 8 additions and 1 deletions

View File

@ -2026,7 +2026,7 @@
}
, move: function (e) {
if (!this.shown) return
if (!this.shown && e.keyCode != 9) return
switch(e.keyCode) {
case 9: // tab
@ -2069,6 +2069,13 @@
break
case 9: // tab
if (!this.shown) {
this.lookup()
return
}
this.select(e)
break
case 13: // enter
if (!this.shown) return
this.select(e)