mirror of
https://github.com/vector-im/element-web.git
synced 2025-09-30 10:01:25 +02:00
fix context menu padding calculation
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
This commit is contained in:
parent
a87e637666
commit
f343aaa05a
@ -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…
x
Reference in New Issue
Block a user