diff --git a/src/components/launch-bar/focus-target.ts b/src/components/launch-bar/focus-target.ts index 6207ecffd..5c1d50bcc 100644 --- a/src/components/launch-bar/focus-target.ts +++ b/src/components/launch-bar/focus-target.ts @@ -16,8 +16,11 @@ export class FocusTarget extends EventTarget { return this.itemIndex } private set index(value: number) { - this.itemIndex = lodash.clamp(value, -1, this.itemLength - 1) - this.dispatchEvent(new CustomEvent('index-change', { detail: this })) + const newIndex = lodash.clamp(value, -1, this.itemLength - 1) + if (this.itemIndex !== newIndex) { + this.itemIndex = newIndex + this.dispatchEvent(new CustomEvent('index-change', { detail: this })) + } } get hasFocus() { return this.itemIndex > -1