mirror of
https://github.com/hanzoai/team.git
synced 2026-09-30 01:57:35 +00:00
* [MM-69557] Fix post actions menu not closing on outside click in mobile view
In the narrow/mobile-responsive layout the post actions ("…") menu renders
as a full-height GenericModal. React-bootstrap only dismisses the modal when
its outer container is clicked directly, but the full-height dialog element
intercepted every click in the dimmed area around the menu, so clicking
outside never closed it.
Let clicks on the empty dialog area fall through to the modal container via
pointer-events (scoped to .menuModal) so clicking outside dismisses the menu,
matching standard popup behavior, while keeping the menu itself interactive.
Co-authored-by: mattermost-code <[email protected]>
* [MM-69557] Add E2E test for mobile post actions menu outside-click dismissal
Adds a Playwright spec covering the mobile/narrow layout where the post actions
("…") menu renders as a full-screen modal. Verifies clicking the dimmed area
outside the menu (both above and below the menu list) dismisses it, and that
selecting a menu item still works. The outside-click test fails without the
pointer-events fix, so it is coupled to the real behavior.
Co-authored-by: mattermost-code <[email protected]>
* [MM-69557] Use type-only import for PlaywrightExtended in mobile dot menu spec
Satisfies the @typescript-eslint/consistent-type-imports lint rule.
Co-authored-by: mattermost-code <[email protected]>
* [MM-69557] Don't treat pointer-events: none as non-focusable in focus trap
The mobile menu fix sets pointer-events: none on .menuModal (restoring
auto on .modal-content). useFocusTrap's isElementVisible() walked the
ancestor chain and rejected any element under a pointer-events: none
ancestor, which broke keyboard focus trapping inside the modal.
pointer-events only affects mouse/touch hit-testing, not keyboard
focusability, and can be re-enabled on descendants, so remove it from
the visibility check. Adds a regression test.
* Address PR feedback: make focus-trap test spy cleanup exception-safe
---------
Co-authored-by: mattermost-code <[email protected]>
Co-authored-by: Hanzo Dev <[email protected]>