fix: restored previous behavior of form_dropdown, this fixes all my observerd bugs with the dropdown behavior

This commit is contained in:
Torkel Ödegaard 2018-01-12 13:06:29 +01:00 committed by Dan Cech
parent 7e750cef43
commit 38f4d5d06d
No known key found for this signature in database
GPG Key ID: 6F1146C5B66FBD41

View File

@ -176,7 +176,7 @@ export class FormDropdownCtrl {
updateValue(text) {
text = _.unescape(text);
if ((!this.allowCustom && text === '') || this.text === text) {
if (text === '' || this.text === text) {
return;
}
@ -225,9 +225,7 @@ export class FormDropdownCtrl {
var typeahead = this.inputElement.data('typeahead');
if (typeahead) {
if (!this.allowCustom) {
this.inputElement.val('');
}
this.inputElement.val('');
typeahead.lookup();
}
}