Merge pull request #5644 from weeman1337/fix-contextmenu-padding

Fix context menu leaving visible area
pull/21833/head
J. Ryan Stinnett 2021-02-22 17:42:09 +00:00 committed by GitHub
commit 72ff919512
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -299,7 +299,7 @@ export class ContextMenu extends React.PureComponent<IProps, IState> {
// such that it does not leave the (padded) window.
if (contextMenuRect) {
const padding = 10;
adjusted = Math.min(position.top, document.body.clientHeight - contextMenuRect.height + padding);
adjusted = Math.min(position.top, document.body.clientHeight - contextMenuRect.height - padding);
}
position.top = adjusted;