Context Menu positioning within scrollable element (angular)
I’m using cdk-virtual-scroll-viewport to display a large list of elements like below <cdk-virtual-scroll-viewport itemSize="115px" class="scrollable-card"> <div *cdkVirtualFor="let project projects"> <app-project-card [project]="project"></app-project-card> </div> </cdk-virtual-scroll-viewport> I have a contextmenu defined in app-project-card component like below <mat-card class="project-card" (contextmenu)="onRightClick($event)"> //other elements inside which are irrelavant </mat-card> <div style="visibility: hidden; position: fixed;" [style.left]="menuTopLeftPosition.x" [style.top]="menuTopLeftPosition.y" [matMenuTriggerFor]="menu"></div> <mat-menu #menu="matMenu"> <button mat-menu-item