Typescript 3 Angular 7 StopPropagation and PreventDefault not working

后端 未结 3 1519
独厮守ぢ
独厮守ぢ 2021-02-18 18:16

I have a text input inside a div. Clicking on the input should set it to focus and stop the bubbling of the div click event. I\'ve tried the stopPropagation and

3条回答
  •  半阙折子戏
    2021-02-18 18:44

    Try with (click)="$event.stopPropagation()". It might help as it worked for me in my scenario.

提交回复
热议问题