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. * Open actions menu popover.
*/ */
async actionsMenu(): Promise<void> { async actionsMenu(event: Event): Promise<void> {
event.stopPropagation();
event.preventDefault();
const items: AddonModDataActionsMenuItem[] = []; const items: AddonModDataActionsMenuItem[] = [];
if (this.entry.canmanageentry) { if (this.entry.canmanageentry) {
@ -202,6 +205,7 @@ export class AddonModDataActionComponent implements OnInit {
componentProps: { items }, componentProps: { items },
showBackdrop: true, showBackdrop: true,
id: 'actionsmenu-popover', 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"> [attr.aria-label]="'addon.mod_data.actionsmenu' | translate">
<ion-icon name="fas-ellipsis-vertical" slot="icon-only" aria-hidden="true"></ion-icon> <ion-icon name="fas-ellipsis-vertical" slot="icon-only" aria-hidden="true"></ion-icon>
</ion-button> </ion-button>