Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 72ff919

Browse files
authored
Merge pull request #5644 from weeman1337/fix-contextmenu-padding
Fix context menu leaving visible area
2 parents 18bd49f + f343aaa commit 72ff919

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/structures/ContextMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ export class ContextMenu extends React.PureComponent<IProps, IState> {
299299
// such that it does not leave the (padded) window.
300300
if (contextMenuRect) {
301301
const padding = 10;
302-
adjusted = Math.min(position.top, document.body.clientHeight - contextMenuRect.height + padding);
302+
adjusted = Math.min(position.top, document.body.clientHeight - contextMenuRect.height - padding);
303303
}
304304

305305
position.top = adjusted;

0 commit comments

Comments
 (0)