Skip to content

Commit 0f6d82d

Browse files
Fix ConversationHeader context menu getting cut off
1 parent b4b3883 commit 0f6d82d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ts/components/conversation/ConversationHeader.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
SubMenu,
1212
} from 'react-contextmenu';
1313

14+
import { createPortal } from 'react-dom';
1415
import { DisappearingTimeDialog } from '../DisappearingTimeDialog';
1516
import { Avatar, AvatarSize } from '../Avatar';
1617
import { InContactsIcon } from '../InContactsIcon';
@@ -479,7 +480,7 @@ export class ConversationHeader extends React.Component<PropsType, StateType> {
479480
);
480481
});
481482

482-
return (
483+
return createPortal(
483484
<ContextMenu id={triggerId} rtl={isRTL}>
484485
{disableTimerChanges ? null : (
485486
<SubMenu hoverDelay={1} title={disappearingTitle} rtl={!isRTL}>
@@ -571,7 +572,8 @@ export class ConversationHeader extends React.Component<PropsType, StateType> {
571572
)}
572573
</MenuItem>
573574
)}
574-
</ContextMenu>
575+
</ContextMenu>,
576+
document.body
575577
);
576578
}
577579

0 commit comments

Comments
 (0)