diff --git a/src/components/utils/popover/components/popover-item/popover-item-default/popover-item-default.ts b/src/components/utils/popover/components/popover-item/popover-item-default/popover-item-default.ts index 6a5d12d01..fdf976534 100644 --- a/src/components/utils/popover/components/popover-item/popover-item-default/popover-item-default.ts +++ b/src/components/utils/popover/components/popover-item/popover-item-default/popover-item-default.ts @@ -103,15 +103,16 @@ export class PopoverItemDefault extends PopoverItem { /** * Called on popover item click + * @param event - click event */ - public handleClick(): void { + public handleClick(event: Event): void { if (this.isConfirmationStateEnabled && this.confirmationState !== null) { - this.activateOrEnableConfirmationMode(this.confirmationState); + this.activateOrEnableConfirmationMode(this.confirmationState, event); return; } - this.activateOrEnableConfirmationMode(this.params); + this.activateOrEnableConfirmationMode(this.params, event); } /** @@ -289,11 +290,12 @@ export class PopoverItemDefault extends PopoverItem { * Executes item's onActivate callback if the item has no confirmation configured * * @param item - item to activate or bring to confirmation mode + * @param event - pointer event that triggered item activation */ - private activateOrEnableConfirmationMode(item: PopoverItemDefaultParams): void { + private activateOrEnableConfirmationMode(item: PopoverItemDefaultParams, event?: PointerEvent): void { if (item.confirmation === undefined) { try { - item.onActivate?.(item); + item.onActivate?.(item, event); this.disableConfirmationMode(); } catch { this.animateError(); diff --git a/src/components/utils/popover/popover-abstract.ts b/src/components/utils/popover/popover-abstract.ts index 2bb096288..dcc9bb46c 100644 --- a/src/components/utils/popover/popover-abstract.ts +++ b/src/components/utils/popover/popover-abstract.ts @@ -253,7 +253,7 @@ export abstract class PopoverAbstract /** Cleanup other items state */ this.itemsDefault.filter(x => x !== item).forEach(x => x.reset()); - item.handleClick(); + item.handleClick(event); this.toggleItemActivenessIfNeeded(item);