Modals used to be closed with onClick handle, but it caused them to close
with following series of event:
- mouseDown event trigerred inside modal
- mouse moved cursor moving outside modal
- mouseUp event trigerred outside, closing the modal
It could be annoying, as it could close modal in unwanted situations i.e.
user pressing button down to select text in modal, moving cursor
outside, releasing button.
Now it should work as expected, closing modal only when both mouseDown and
mouseUp were triggered in the backgroud of modal.