In my Angular 4 application, I have a parent component with a (dblclick) handler and a child component with a (click) handler.
component.html
<mat-list (dblclick)="goBack()">
<button (click)="add($event)"> Add </button>
</mat-list>
component.ts
add(event){
event.stopPropagation();
doSomething();
}
However, from what I've seen, stopPropagation only stops events of the same type. In this example, if someone double clicks the button, it calls the goBack() function. If I change the parent component's event to a single (click) event, the propagation is stopped.
Is there anyway for me to block a (dblclick) in parent through the child's (click) event?
Thanks in advance.