[web] Closing modal with outside click changed
Summary:
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.
Test Plan:
Built app.
Played around with "Chat settings" modal.
Verified that everything works as exprected.
Reviewers: tomek, kamil, atul, rohan, ginsu
Reviewed By: tomek, ginsu
Subscribers: ashoat, abosh
Differential Revision: https://phab.comm.dev/D5315