You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// We want the distance between the top of the overlay to the bottom of the boundary
315
314
Math.max(0,
@@ -558,10 +557,33 @@ export function calculatePosition(opts: PositionOpts): PositionResult {
558
557
// Otherwise this returns the height/width of a arbitrary boundary element, and its top/left with respect to the viewport (NOTE THIS MEANS IT DOESNT INCLUDE SCROLL)
// If the container is the HTML element wrapping the body element, the retrieved scrollTop/scrollLeft will be equal to the
562
-
// body element's scroll. Set the container's scroll values to 0 since the overlay's edge position value in getDelta don't then need to be further offset
563
-
// by the container scroll since they are essentially the same containing element and thus in the same coordinate system
// There are several difference cases of how to calculate the containerOffsetWithBoundary:
562
+
// - boundaryElement is body or HTML and the container is an arbitrary element in the boundary (aka submenu with parent menu as container in v3)
563
+
// - boundaryElement and container are both body or HTML element (aka standard popover case)
564
+
// - boundaryElement is customized by the user. Container can also be arbitrary (either body/HTML or some other element)
565
+
// containerOffsetWithBoundary should always return a value that is the boundary's coordinate offset with respect to the container coord system (container is 0, 0)
0 commit comments