Ver código fonte

Use the auto_first setting

JC Brand 7 anos atrás
pai
commit
b6f5cd2cc9
2 arquivos alterados com 1 adições e 1 exclusões
  1. 0 1
      src/converse-autocomplete.js
  2. 1 0
      src/converse-muc-views.js

+ 0 - 1
src/converse-autocomplete.js

@@ -326,7 +326,6 @@
                         }
                         this.suggestions = this.suggestions.slice(0, this.max_items);
                         this.suggestions.forEach((text) => this.ul.appendChild(this.item(text, value)));
-                        this.next();
 
                         if (this.ul.children.length === 0) {
                             this.close({'reason': 'nomatches'});

+ 1 - 0
src/converse-muc-views.js

@@ -612,6 +612,7 @@
 
                 initAutoComplete () {
                     this.auto_complete = new _converse.AutoComplete(this.el, {
+                        'auto_first': true,
                         'auto_evaluate': false,
                         'min_chars': 1,
                         'match_current_word': true,