Fix tags autocompletion (#1329)
This commit is contained in:
parent
147af98783
commit
1c22cb542f
1 changed files with 4 additions and 4 deletions
|
@ -176,9 +176,9 @@
|
||||||
var checkAutocomplete = oldValue == true? false : true;
|
var checkAutocomplete = oldValue == true? false : true;
|
||||||
// check if the Value ist new
|
// check if the Value ist new
|
||||||
var isNewResult = isNew($(this).val(), checkAutocomplete);
|
var isNewResult = isNew($(this).val(), checkAutocomplete);
|
||||||
if(isNewResult[0] === true || (isNewResult[0] === false && typeof isNewResult[1] == 'string')) {
|
if(isNewResult[0] === true || isNewResult[1] != null) {
|
||||||
|
|
||||||
if(oldValue == false && typeof isNewResult[1] == 'string') {
|
if(oldValue == false && isNewResult[1] != null) {
|
||||||
oldValue = true;
|
oldValue = true;
|
||||||
id = isNewResult[1];
|
id = isNewResult[1];
|
||||||
}
|
}
|
||||||
|
@ -459,7 +459,7 @@
|
||||||
label = label.toLowerCase();
|
label = label.toLowerCase();
|
||||||
if (label == compareValue) {
|
if (label == compareValue) {
|
||||||
isNew = false;
|
isNew = false;
|
||||||
autoCompleteId = result[i].id;
|
autoCompleteId = typeof result[i] == 'string' ? i : result[i].id;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue