From 04fc1be3d2d606b2f0b3d13dbacf4f1554759ba5 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 8 Mar 2023 15:50:15 +0000 Subject: [PATCH] Add max height to popover when rendering above anchor (#9945) --- packages/bbui/src/Actions/position_dropdown.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/bbui/src/Actions/position_dropdown.js b/packages/bbui/src/Actions/position_dropdown.js index abc7188985..ecbb5747c4 100644 --- a/packages/bbui/src/Actions/position_dropdown.js +++ b/packages/bbui/src/Actions/position_dropdown.js @@ -31,6 +31,7 @@ export default function positionDropdown(element, opts) { styles.top = anchorBounds.top } else if (window.innerHeight - anchorBounds.bottom < 100) { styles.top = anchorBounds.top - elementBounds.height - offset + styles.maxHeight = 240 } else { styles.top = anchorBounds.bottom + offset styles.maxHeight = window.innerHeight - anchorBounds.bottom - 20