autocomplete fixes

This commit is contained in:
Yuri Kuznetsov
2022-04-19 23:08:26 +03:00
parent a0819e8cdc
commit 87c5089a8e
3 changed files with 9 additions and 10 deletions
+1 -1
View File
@@ -235,7 +235,7 @@ define('views/fields/link-multiple', 'views/fields/base', function (Dep) {
if (!this.autocompleteDisabled) { if (!this.autocompleteDisabled) {
this.$element.on('blur', () => { this.$element.on('blur', () => {
setTimeout(() => this.$element.autocomplete('clear'), 100); setTimeout(() => this.$element.autocomplete('clear'), 300);
}); });
this.$element.autocomplete({ this.$element.autocomplete({
+4 -5
View File
@@ -282,11 +282,11 @@ define('views/fields/link-parent', 'views/fields/base', function (Dep) {
if (this.mode === 'edit') { if (this.mode === 'edit') {
e.currentTarget.value = this.model.get(this.nameName) || ''; e.currentTarget.value = this.model.get(this.nameName) || '';
} }
if (!this.autocompleteDisabled) {
this.$elementName.autocomplete('clear');
}
}, 100); }, 100);
if (!this.autocompleteDisabled) {
setTimeout(() => this.$elementName.autocomplete('clear'), 300);
}
}); });
if (!this.autocompleteDisabled) { if (!this.autocompleteDisabled) {
@@ -335,7 +335,6 @@ define('views/fields/link-parent', 'views/fields/base', function (Dep) {
}); });
this.$elementName.off('focus.autocomplete'); this.$elementName.off('focus.autocomplete');
this.$elementName.on('focus', () => this.$elementName.get(0).select()); this.$elementName.on('focus', () => this.$elementName.get(0).select());
this.$elementName.attr('autocomplete', 'espo-' + this.name); this.$elementName.attr('autocomplete', 'espo-' + this.name);
+4 -4
View File
@@ -305,11 +305,11 @@ define('views/fields/link', 'views/fields/base', function (Dep) {
if (this.mode === 'edit' && this.model.has(this.nameName)) { if (this.mode === 'edit' && this.model.has(this.nameName)) {
e.currentTarget.value = this.model.get(this.nameName); e.currentTarget.value = this.model.get(this.nameName);
} }
if (!this.autocompleteDisabled) {
this.$elementName.autocomplete('clear');
}
}, 100); }, 100);
if (!this.autocompleteDisabled) {
setTimeout(() => this.$elementName.autocomplete('clear'), 300);
}
}); });
var $elementName = this.$elementName; var $elementName = this.$elementName;