Update outside popover styles

This commit is contained in:
Andrew Kingston 2024-02-02 10:27:23 +00:00
parent 06556325a1
commit a880c5e62a
1 changed files with 3 additions and 2 deletions

View File

@ -38,8 +38,9 @@ export default function positionDropdown(element, opts) {
styles = customUpdate(anchorBounds, elementBounds, styles)
} else {
// Determine vertical styles
if (align === "right-outside") {
styles.top = anchorBounds.top
if (align === "right-outside" || align === "left-outside") {
styles.top = anchorBounds.bottom - elementBounds.height
styles.maxHeight = maxHeight
} else if (
window.innerHeight - anchorBounds.bottom <
(maxHeight || 100)