Autocomplete nicknames with Tab key

This commit is contained in:
Sébastien Hut 2015-04-04 15:24:25 +02:00 committed by Sébastien Hut
parent 9e4e35d297
commit a09f78b77f
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@ module.exports = BasePage.extend({
this.resizeInput();
},
handleKeyDown: function (e) {
if (e.which === 13 && !e.shiftKey) {
if ((e.which === 13 || e.which === 9) && !e.shiftKey) { // Enter or Tab
if (this.$autoComplete.css('display') != 'none') {
var nickname = this.$autoComplete.find(">:nth-child(" + this.autoCompletePos + ")>:first-child").text();
this.rosterItemSelected(nickname);