From bea28de6a0a41bbb948551c43a4fbf787fc5ecb3 Mon Sep 17 00:00:00 2001 From: azivner Date: Tue, 27 Nov 2018 13:13:06 +0100 Subject: [PATCH] tab on autocomplete doesn't select first item, closes #243 --- src/public/javascripts/services/attribute_autocomplete.js | 6 ++++-- src/public/javascripts/services/attributes.js | 3 ++- src/public/javascripts/services/note_autocomplete.js | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/public/javascripts/services/attribute_autocomplete.js b/src/public/javascripts/services/attribute_autocomplete.js index fee0b1aed..73d3d21df 100644 --- a/src/public/javascripts/services/attribute_autocomplete.js +++ b/src/public/javascripts/services/attribute_autocomplete.js @@ -12,7 +12,8 @@ function initAttributeNameAutocomplete({ $el, attributeType, open }) { hint: false, autoselect: true, openOnFocus: true, - minLength: 0 + minLength: 0, + tabAutocomplete: false }, [{ displayKey: 'name', // disabling cache is important here because otherwise cache can stay intact when switching between attribute type which will lead to autocomplete displaying attribute names for incorrect attribute type @@ -59,7 +60,8 @@ async function initLabelValueAutocomplete({ $el, open }) { hint: false, autoselect: true, openOnFocus: true, - minLength: 0 + minLength: 0, + tabAutocomplete: false }, [{ displayKey: 'value', source: function (term, cb) { diff --git a/src/public/javascripts/services/attributes.js b/src/public/javascripts/services/attributes.js index 366c638d4..b93174882 100644 --- a/src/public/javascripts/services/attributes.js +++ b/src/public/javascripts/services/attributes.js @@ -146,7 +146,8 @@ async function createPromotedAttributeRow(definitionAttr, valueAttr) { hint: false, autoselect: true, openOnFocus: true, - minLength: 0 + minLength: 0, + tabAutocomplete: false }, [{ displayKey: 'value', source: function (term, cb) { diff --git a/src/public/javascripts/services/note_autocomplete.js b/src/public/javascripts/services/note_autocomplete.js index 2b525eff3..4e9ad1f38 100644 --- a/src/public/javascripts/services/note_autocomplete.js +++ b/src/public/javascripts/services/note_autocomplete.js @@ -76,7 +76,8 @@ function initNoteAutocomplete($el, options) { hint: false, autoselect: true, openOnFocus: true, - minLength: 0 + minLength: 0, + tabAutocomplete: false }, [ { source: autocompleteSource,