mirror of https://github.com/zulip/zulip.git
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:
parent
524ef509fe
commit
0e2c509a24
|
@ -2026,7 +2026,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
, move: function (e) {
|
, move: function (e) {
|
||||||
if (!this.shown) return
|
if (!this.shown && e.keyCode != 9) return
|
||||||
|
|
||||||
switch(e.keyCode) {
|
switch(e.keyCode) {
|
||||||
case 9: // tab
|
case 9: // tab
|
||||||
|
@ -2069,6 +2069,13 @@
|
||||||
break
|
break
|
||||||
|
|
||||||
case 9: // tab
|
case 9: // tab
|
||||||
|
if (!this.shown) {
|
||||||
|
this.lookup()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.select(e)
|
||||||
|
break
|
||||||
|
|
||||||
case 13: // enter
|
case 13: // enter
|
||||||
if (!this.shown) return
|
if (!this.shown) return
|
||||||
this.select(e)
|
this.select(e)
|
||||||
|
|
Loading…
Reference in New Issue