Merge pull request #5644 from weeman1337/fix-contextmenu-padding
Fix context menu leaving visible areapull/21833/head
commit
72ff919512
|
@ -299,7 +299,7 @@ export class ContextMenu extends React.PureComponent<IProps, IState> {
|
||||||
// such that it does not leave the (padded) window.
|
// such that it does not leave the (padded) window.
|
||||||
if (contextMenuRect) {
|
if (contextMenuRect) {
|
||||||
const padding = 10;
|
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;
|
position.top = adjusted;
|
||||||
|
|
Loading…
Reference in New Issue