Should only close the modal either when you click outside of the modal content or when you click on the close button. Currently, the button element that the entire modal is wrapped in accepts any click events, even on the modal content (which is supposed to have a higher z-index, but this doesn't seem to work).