Skip to content

Commit

Permalink
fix(ui5-popover): popover arrow is aligned to the middle of the opener
Browse files Browse the repository at this point in the history
downport of #9938
fixes: #9886
  • Loading branch information
kskondov committed Jan 24, 2025
1 parent 31cbf16 commit 4e03d3a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/main/src/Popover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -567,10 +567,10 @@ class Popover extends Popup {
left = clientWidth - Popover.VIEWPORT_MARGIN - popoverSize.width;
}
} else {
if (popoverSize.height > clientHeight || top < 0) { // eslint-disable-line
top = 0;
} else if (top + popoverSize.height > clientHeight) {
top -= top + popoverSize.height - clientHeight;
if (popoverSize.height > clientHeight || top < Popover.VIEWPORT_MARGIN) { // eslint-disable-line
top = Popover.VIEWPORT_MARGIN;
} else if (top + popoverSize.height > clientHeight - Popover.VIEWPORT_MARGIN) {
top = clientHeight - Popover.VIEWPORT_MARGIN - popoverSize.height;
}
}

Expand Down

0 comments on commit 4e03d3a

Please sign in to comment.