@primer/behaviors 1.5.0 → 1.5.1-rc.b50217f
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.
|
@@ -151,7 +151,7 @@ function pureCalculateAnchoredPosition(viewportRect, relativePosition, floatingR
|
|
|
151
151
|
}
|
|
152
152
|
if (alternateOrder && positionAttempt < alternateOrder.length) {
|
|
153
153
|
if (pos.top + floatingRect.height > viewportRect.height + relativeViewportRect.top) {
|
|
154
|
-
pos.top = viewportRect.height + relativeViewportRect.top - floatingRect.height;
|
|
154
|
+
pos.top = Math.max(viewportRect.height + relativeViewportRect.top - floatingRect.height, 0);
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
}
|
|
@@ -147,7 +147,7 @@ function pureCalculateAnchoredPosition(viewportRect, relativePosition, floatingR
|
|
|
147
147
|
}
|
|
148
148
|
if (alternateOrder && positionAttempt < alternateOrder.length) {
|
|
149
149
|
if (pos.top + floatingRect.height > viewportRect.height + relativeViewportRect.top) {
|
|
150
|
-
pos.top = viewportRect.height + relativeViewportRect.top - floatingRect.height;
|
|
150
|
+
pos.top = Math.max(viewportRect.height + relativeViewportRect.top - floatingRect.height, 0);
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
}
|