HomePhabricator
Diffusion Comm 556ede9616a4

[web] Escape focus trap when an outside node is clicked

Description

[web] Escape focus trap when an outside node is clicked

Summary:
All of the context and investigation is in ENG-3954, but encompassing ModalOverlay in a focus-trap
was blocking all tooltip actions, since it was not contained within the trapped DOM element.

There were a few solutions proposed, this one is just the simplest. There are two configurable options that can be passed into the component,
clickOutsideDeactivates and allowOutsideClick. Both seem to resolve the issue, but I opted for allowOutsideClick as instead of entirely deactivating the focus-trap and letting outside clicks to continue, it
just filters through the click and allows outside actions.

Test Plan:
Please see the video below showing the solution

Reviewers: kuba, ashoat

Reviewed By: kuba, ashoat

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D8053

Details

Provenance
rohanAuthored on Jun 1 2023, 9:10 AM
Reviewer
kuba
Differential Revision
D8053: [web] Escape focus trap when an outside node is clicked
Parents
rCOMM9461175282dc: [web][fix] Fixed cursor issue in the message editing
Branches
Unknown
Tags
Unknown