For closing modal, currently we have two options –
- Click on Overlay
- Click on close button
Now, if user doesn’t want to close the modal by clicking on either of these two options, I have introduced a new class.
When a user wants to close the modal from an internal link in the modal content or from a custom button, just apply this class name to that element. When a user clicks on that element where this class is applied, the current open modal will be closed.
This will close the modal