Improved UX of user selection
Supported Tab for selecting highlighted item Selecting first item by Tab, if nothing is highlighted Closes #774
This commit is contained in:
parent
780d1380af
commit
22fb8097b4
@ -586,8 +586,11 @@ MessageComposer.prototype.onKeyEvent = function (e) {
|
|||||||
return cancelEvent(e);
|
return cancelEvent(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.keyCode == 13) { // ENTER
|
if (e.keyCode == 13 || e.keyCode == 9) { // Enter or Tab
|
||||||
var currentSelected = $(this.autoCompleteEl).find('.composer_autocomplete_option_active');
|
var currentSelected = $(this.autoCompleteEl).find('.composer_autocomplete_option_active');
|
||||||
|
if (!currentSelected.length && e.keyCode == 9) {
|
||||||
|
currentSelected = $(this.autoCompleteEl[0].childNodes[0]).find('a');
|
||||||
|
}
|
||||||
var code, mention;
|
var code, mention;
|
||||||
if (code = currentSelected.attr('data-code')) {
|
if (code = currentSelected.attr('data-code')) {
|
||||||
this.onEmojiSelected(code, true);
|
this.onEmojiSelected(code, true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user