fix context menu padding calculation

Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
pull/21833/head
Michael Weimann 2021-02-14 18:37:06 +01:00
parent a87e637666
commit f343aaa05a
No known key found for this signature in database
GPG Key ID: 34F0524D4DA694A1
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;