@@ -239,7 +239,7 @@ export function calculatePosition({
239239 // the popover is only bound by the viewport if it is rendered in a portal
240240 renderWithPortal,
241241 allowVerticalOverflow,
242- minHeight ,
242+ minVisibleBlockSize ,
243243} : {
244244 preferredPosition : PopoverProps . Position ;
245245 fixedInternalPosition ?: InternalPosition ;
@@ -251,7 +251,7 @@ export function calculatePosition({
251251 // the popover is only bound by the viewport if it is rendered in a portal
252252 renderWithPortal ?: boolean ;
253253 allowVerticalOverflow ?: boolean ;
254- minHeight ?: number ;
254+ minVisibleBlockSize ?: number ;
255255} ) : CalculatedPosition {
256256 let bestOption : CandidatePosition | null = null ;
257257
@@ -267,12 +267,12 @@ export function calculatePosition({
267267 ? getIntersection ( [ rect , viewport ] )
268268 : getIntersection ( [ rect , viewport , container ] ) ;
269269
270- // When min height is set, the popover is considered fitting the container if the available space
271- // is the same or larger than min height , even if it means the scrollbar is needed.
270+ // When min visible block size is set, the popover is considered fitting the container if the available space
271+ // is the same or larger than min allowed , even if it means the scrollbar is needed.
272272 const fitsBlockSize =
273- minHeight === undefined
273+ minVisibleBlockSize === undefined
274274 ? visibleArea && visibleArea . blockSize === body . blockSize
275- : visibleArea && visibleArea . blockSize >= Math . min ( body . blockSize , minHeight ) ;
275+ : visibleArea && visibleArea . blockSize >= Math . min ( body . blockSize , minVisibleBlockSize ) ;
276276 const fitsInlineSize = visibleArea && visibleArea . inlineSize === body . inlineSize ;
277277
278278 if ( fitsBlockSize && fitsInlineSize ) {
0 commit comments