I am facing an issue with a nested div structure. The main div, which has a width of 100%, contains a context menu. The child div, with a width of 25%, also has its own context menu. However, when I click on the child div, both context menus open simultaneously. How can I prevent the parent context menu from opening in this scenario? Any assistance would be greatly appreciated.
<div class="icon-td" (contextmenu)="sheetMenu($event);">
<button mat-icon-button
(click)="hideChild(lineitem)">
<mat-icon class="mat-icon-rtl-mirror">
{{lineitem.display ? 'expand_less' : 'chevron_right'}}
</mat-icon>
</button>
<div >
<mat-icon class="note-icon">sticky_note_2_outline</mat-icon>
</div>
<mat-form-field floatLabel="never" class="line-item-field" (contextmenu)="lineItemMenu($event);">
<input [style.marginLeft.px]="lineitem.level * 16" matInput
[value]="lineitem.lineItem" [id]="'line_'+lineitem.id">
</mat-form-field>
</div>
https://i.sstatic.net/KMUdu.png
What I expect is for only the lineItemMenu to open, but currently both sheetMenu and lineItemMenu are being triggered.