NG-ZORRO/ng-zorro-antd

Nz-Modal backdrop click triggers only once nzOnCancel

Lavos96 opened this issue · 1 comments

Reproduction link

https://stackblitz.com/edit/ng-zorro-antd-start-xdbn2s?file=src%2Fapp%2Fapp.module.ts

Steps to reproduce

We have a main modal, when we want to leave the main modal, we display another modal in which we display information for the user, e.g. that if he leaves the modal without confirming any changes, he will lose his progress. The user can leave the modal by clicking the cross in the upper right corner (this works as it should) and by clicking in the grayed out area outside the modal. When he clicks on the grayed out area, the modal confirming whether he wants to leave the main modal is displayed correctly then in our scenario user clicks cancel in that modal so the main modal is not being closed, then when he clicks on the grayed out area a second, third time, etc., nothing happens.

What is expected?

The application responds to each click on the grayed out background and fires the nzOnCancel function.

What is actually happening?

The application does not respond to each click on the grayed out background (it responds only the first time) and does not activate the nzOnCancel function.

Environment Info
ng-zorro-antd 17.0.1
Browser Chrome 121.0.6167.161

Connected issues: #6556
#7079

I also had the same problem. Can someone please check?