MOBILE-4248 action: Fix popover position

main
Alfonso Salces 2023-05-11 10:18:11 +02:00
parent b3b269c8d7
commit 16c63a7708
2 changed files with 6 additions and 2 deletions

View File

@ -146,7 +146,10 @@ export class AddonModDataActionComponent implements OnInit {
/**
* Open actions menu popover.
*/
async actionsMenu(): Promise<void> {
async actionsMenu(event: Event): Promise<void> {
event.stopPropagation();
event.preventDefault();
const items: AddonModDataActionsMenuItem[] = [];
if (this.entry.canmanageentry) {
@ -202,6 +205,7 @@ export class AddonModDataActionComponent implements OnInit {
componentProps: { items },
showBackdrop: true,
id: 'actionsmenu-popover',
event,
});
}

View File

@ -1,4 +1,4 @@
<ion-button size="small" *ngIf="action == 'actionsmenu'" fill="clear" (click)="actionsMenu()"
<ion-button size="small" *ngIf="action == 'actionsmenu'" fill="clear" (click)="actionsMenu($event)"
[attr.aria-label]="'addon.mod_data.actionsmenu' | translate">
<ion-icon name="fas-ellipsis-vertical" slot="icon-only" aria-hidden="true"></ion-icon>
</ion-button>