When a user hits Escape key, clicks the close button, or clicks outside, the modal emits a cancel event.
cancel
If preventDefault() is called on the cancel event, then the modal will not close.
preventDefault()