diff --git a/projects/komponentkartan/src/lib/controls/filter-tag/filter-tag-group.component.ts b/projects/komponentkartan/src/lib/controls/filter-tag/filter-tag-group.component.ts index 6301975d4..279379341 100644 --- a/projects/komponentkartan/src/lib/controls/filter-tag/filter-tag-group.component.ts +++ b/projects/komponentkartan/src/lib/controls/filter-tag/filter-tag-group.component.ts @@ -47,7 +47,6 @@ export class FilterTagGroupComponent implements AfterContentInit, OnDestroy { if (this.lastSelectedIndex < nonRemovedFilterTags.length) { nonRemovedFilterTags[this.lastSelectedIndex].focus(); } else if (nonRemovedFilterTags.length) { - this.lastSelectedIndex = nonRemovedFilterTags.length - 1; nonRemovedFilterTags[nonRemovedFilterTags.length - 1].focus(); } } diff --git a/projects/komponentkartan/src/lib/controls/filter-tag/filter-tag.component.ts b/projects/komponentkartan/src/lib/controls/filter-tag/filter-tag.component.ts index 075956d4e..5a0bfbaf4 100644 --- a/projects/komponentkartan/src/lib/controls/filter-tag/filter-tag.component.ts +++ b/projects/komponentkartan/src/lib/controls/filter-tag/filter-tag.component.ts @@ -42,19 +42,7 @@ export class FilterTagComponent implements AfterViewInit { } focus() { - // focus() does not work in IE11 unless - // called after a short delay. Wrap in if - // to not do this in better browsers. - const re = /Trident\/7/; - const isIE11 = re.test(window.navigator.userAgent); - - if (isIE11) { - setTimeout(() => { - this.filtertag.nativeElement.focus(); - }, 5); - } else { - this.filtertag.nativeElement.focus(); - } + this.filtertag.nativeElement.focus(); } emitRemove() {