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
When the height of a floating element is greater than the boundary (the viewport by default), and if we set the crossAxis option to true for the shift middleware to allow the floating element to overlap the reference element,
the size middleware computes a different available height for the top placement than for the bottom placement, whereas we would expect it to return the same (to avoid overflow).
Describe the bug
When the height of a floating element is greater than the boundary (the viewport by default), and if we set the
crossAxis
option totrue
for theshift
middleware to allow the floating element to overlap the reference element,the
size
middleware computes a different available height for thetop
placement than for thebottom
placement, whereas we would expect it to return the same (to avoid overflow).To Reproduce
https://codesandbox.io/p/sandbox/cranky-wood-k9pqcz
Steps to reproduce the behavior:
Button
to open the popover, you can see the maximum height of the popover is100px
top
to change theplacement
, now you can see the maximum height of the popover is160px
, we expect its maximum height to remain100px
Expected behavior
The
size
middleware should correctly clip the width/height of the floating element to prevent it from overflowing the viewport or boundary.Screenshots
placement = bottom
placement = top
The text was updated successfully, but these errors were encountered: