Skip to content

Commit f133dbe

Browse files
committed
fix(esl-carousel): fix missing activators for build-in plugins
1 parent 70f6322 commit f133dbe

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

packages/esl/src/esl-carousel/plugin/autoplay/esl-carousel.autoplay.mixin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export class ESLCarouselAutoplayMixin extends ESLCarouselPlugin<ESLCarouselAutop
126126
protected async _onCycle(exec?: boolean): Promise<void> {
127127
this._duration && window.clearTimeout(this._duration);
128128
this._duration = null;
129-
if (exec) await this.$host?.goTo(this.config.command).catch(console.debug);
129+
if (exec) await this.$host?.goTo(this.config.command, {activator: this}).catch(console.debug);
130130
if (!this.enabled || this.active) return;
131131
const {duration} = this;
132132
this._duration = window.setTimeout(() => this._onCycle(true), duration);

packages/esl/src/esl-carousel/plugin/dots/esl-carousel.nav.dots.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ export class ESLCarouselNavDots extends ESLBaseElement {
189189
if (!this.$carousel || typeof this.$carousel.goTo !== 'function') return;
190190
const $btn = event.$delegate as HTMLElement;
191191
const target = $btn.getAttribute('esl-carousel-dot') || '';
192-
this.$carousel.goTo(`group:${+target}`).catch(console.debug);
192+
this.$carousel.goTo(`group:${+target}`, {activator: this}).catch(console.debug);
193193
(this.tabIndex >= 0 ? this : $btn).focus({preventScroll: true});
194194
}
195195

packages/esl/src/esl-carousel/plugin/keyboard/esl-carousel.keyboard.mixin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export class ESLCarouselKeyboardMixin extends ESLCarouselPlugin<ESLCarouselKeybo
4242
protected _onKeydown(event: KeyboardEvent): void {
4343
if (!this.$host || this.$host.animating) return;
4444
const command = this.getCommandFromKey(event.key);
45-
command && this.$host.goTo(command).catch(console.debug);
45+
command && this.$host.goTo(command, {activator: this}).catch(console.debug);
4646
}
4747
}
4848

packages/esl/src/esl-carousel/plugin/nav/esl-carousel.nav.mixin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export class ESLCarouselNavMixin extends ESLMixinElement {
7676
@listen('click')
7777
protected _onClick(e: PointerEvent): void {
7878
if (!this.$carousel || typeof this.$carousel.goTo !== 'function') return;
79-
this.$carousel.goTo(this.command).catch(console.debug);
79+
this.$carousel.goTo(this.command, {activator: this.$host}).catch(console.debug);
8080
e.preventDefault();
8181
}
8282
}

0 commit comments

Comments
 (0)