fix(popover): clamp y position when on bottom
This commit is contained in:
parent
173a9557c2
commit
93578816f9
1 changed files with 2 additions and 0 deletions
|
|
@ -317,7 +317,9 @@ where
|
|||
Position::Bottom => {
|
||||
// Position is set to the center bottom of the widget
|
||||
let width = node.size().width;
|
||||
let height = node.size().height;
|
||||
position.x = (position.x - width / 2.0).clamp(0.0, bounds.width - width);
|
||||
position.y = position.y.clamp(0.0, bounds.height - height);
|
||||
}
|
||||
Position::Point(_) => {
|
||||
// Position is using context menu logic
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue