I am able to prevent a modal being closed as per the example in the docs by setting closable: false
. But if I include a close icon in my html then this is not picked up as a deny action and goes ahead and closes the modal, no matter what.
I presume that this is because the DOM Settings for a modal look like this:
selector : {
close : '.close, .actions .button',
approve : '.actions .positive, .actions .approve, .actions .ok',
deny : '.actions .negative, .actions .deny, .actions .cancel'
},
You can see that .close
is not in the deny selector.
So how can I have the .close
icon fire the onDeny callback? (Note. I tried wrapping .close.icon
in an .actions
class but this breaks the modal.)