mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix refreshPosition
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
650b24c1f0
commit
931259b731
@ -122,7 +122,10 @@ export class Menu extends React.Component<MenuProps, State> {
|
||||
}
|
||||
|
||||
refreshPosition = () => {
|
||||
if (!this.props.usePortal || !this.opener) return;
|
||||
if (!this.props.usePortal || !this.opener || !this.elem) {
|
||||
return;
|
||||
}
|
||||
|
||||
const { width, height } = this.opener.getBoundingClientRect();
|
||||
let { left, top, bottom, right } = this.opener.getBoundingClientRect();
|
||||
const withScroll = window.getComputedStyle(this.elem).position !== "fixed";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user