@jetbrains/ring-ui 7.0.88 → 7.0.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -52,8 +52,8 @@ export const setCSSAnchorPositioning = ({ popup, anchor, uid, minWidth, top, lef
|
|
|
52
52
|
if (left) {
|
|
53
53
|
popup.style.left = `${left}px`;
|
|
54
54
|
}
|
|
55
|
-
// When
|
|
56
|
-
const SHOULD_AUTO_SHRINK = directions.
|
|
55
|
+
// When all directions are BOTTOM, the `max-height: 100%` from CSS should stay applied so popup doesn't overflow the anchor RG-2754
|
|
56
|
+
const SHOULD_AUTO_SHRINK = directions.every(d => d.startsWith('BOTTOM'));
|
|
57
57
|
if (!SHOULD_AUTO_SHRINK) {
|
|
58
58
|
const screenWithMargin = `calc(100vh - ${Dimension.MARGIN * 2}px)`;
|
|
59
59
|
if (maxHeight === 'screen' || maxHeight === MaxHeight.SCREEN) {
|