Fix vanishing recently viewed menu (#7887)
Signed-off-by: Robin Townsend <robin@robin.town>
This commit is contained in:
parent
fe2fceb0ba
commit
c638af703e
1 changed files with 2 additions and 2 deletions
|
@ -357,7 +357,7 @@ export default class InteractiveTooltip extends React.Component<IProps, IState>
|
||||||
} else {
|
} else {
|
||||||
const targetRight = targetRect.right + window.pageXOffset;
|
const targetRight = targetRect.right + window.pageXOffset;
|
||||||
const spaceOnRight = UIStore.instance.windowWidth - targetRight;
|
const spaceOnRight = UIStore.instance.windowWidth - targetRight;
|
||||||
return !contentRect || (spaceOnRight - contentRect.width < MIN_SAFE_DISTANCE_TO_WINDOW_EDGE);
|
return contentRect && (spaceOnRight - contentRect.width < MIN_SAFE_DISTANCE_TO_WINDOW_EDGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -371,7 +371,7 @@ export default class InteractiveTooltip extends React.Component<IProps, IState>
|
||||||
} else {
|
} else {
|
||||||
const targetBottom = targetRect.bottom + window.pageYOffset;
|
const targetBottom = targetRect.bottom + window.pageYOffset;
|
||||||
const spaceBelow = UIStore.instance.windowHeight - targetBottom;
|
const spaceBelow = UIStore.instance.windowHeight - targetBottom;
|
||||||
return !contentRect || (spaceBelow - contentRect.height < MIN_SAFE_DISTANCE_TO_WINDOW_EDGE);
|
return contentRect && (spaceBelow - contentRect.height < MIN_SAFE_DISTANCE_TO_WINDOW_EDGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue