Add max height to popover when rendering above anchor (#9945)
This commit is contained in:
parent
3328a9524e
commit
04fc1be3d2
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue