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