fix(profile): keep desktop user-room-profile pane open on outside clicks, close only via × or Esc

This commit is contained in:
v.lagerev 2026-05-11 14:09:07 +03:00
parent eab52f7b6c
commit 31a4e4240c

View file

@ -58,11 +58,12 @@ export function RoomViewProfileSidePanel() {
<FocusTrap
focusTrapOptions={{
initialFocus: false,
// Click outside (on the chat) closes the pane on desktop —
// matches the «third screen» mental model where the side
// pane is a temporary overlay, not pinned chrome. `Esc` also
// closes via focus-trap.
clickOutsideDeactivates: true,
// Outside clicks pass through to the chat (`allowOutsideClick`)
// but don't close the pane — clicking around in the chat to
// scroll, react, or compose shouldn't dismiss the profile.
// Explicit close is via the header's `×` or `Esc` (the latter
// still routes through focus-trap → `onDeactivate`).
clickOutsideDeactivates: false,
allowOutsideClick: () => true,
escapeDeactivates: stopPropagation,
onDeactivate: () => {