diff --git a/src/Squidex/Pipeline/Squid/icon-happy.svg b/src/Squidex/Pipeline/Squid/icon-happy.svg index 8bba6ab6e..c6f46c158 100644 --- a/src/Squidex/Pipeline/Squid/icon-happy.svg +++ b/src/Squidex/Pipeline/Squid/icon-happy.svg @@ -1,13 +1,13 @@ diff --git a/src/Squidex/app/framework/angular/forms/tag-editor.component.ts b/src/Squidex/app/framework/angular/forms/tag-editor.component.ts index 9a9c19608..dedd95008 100644 --- a/src/Squidex/app/framework/angular/forms/tag-editor.component.ts +++ b/src/Squidex/app/framework/angular/forms/tag-editor.component.ts @@ -213,10 +213,10 @@ export class TagEditorComponent implements AfterViewInit, ControlValueAccessor, public markTouched() { this.selectValue(this.addInput.value); - this.callTouched(); this.resetAutocompletion(); + this.resetFocus(); - this.hasFocus = false; + this.callTouched(); } public remove(index: number) { @@ -299,7 +299,11 @@ export class TagEditorComponent implements AfterViewInit, ControlValueAccessor, return true; } - public selectValue(value: string) { + public selectValue(value: string, noFocus?: boolean) { + if (!noFocus) { + this.inputElement.nativeElement.focus(); + } + if (value && this.converter.isValidInput(value)) { const converted = this.converter.convert(value); @@ -330,6 +334,10 @@ export class TagEditorComponent implements AfterViewInit, ControlValueAccessor, this.suggestedIndex = selection; } + public resetFocus(): any { + this.hasFocus = false; + } + private resetForm() { this.addInput.reset(); }