HomePhabricator
Diffusion Comm 7c6cfdc6a732

[web] Closing modal with outside click changed

Description

[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:

  1. mouseDown event trigerred inside modal
  2. mouse moved cursor moving outside modal
  3. 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

Details

Provenance
przemekAuthored on Oct 7 2022, 6:54 AM
Reviewer
tomek
Differential Revision
D5315: [web] Closing modal with outside click changed
Parents
rCOMMd80ac01bc30f: Remove deleting cxx files after build
Branches
Unknown
Tags
Unknown