fix: bad menu position when no positioning item specified (#28224)
This commit is contained in:
parent
8476bed36e
commit
b52ccc9726
1 changed files with 1 additions and 1 deletions
|
@ -88,7 +88,7 @@ void MenuMac::PopupOnUI(const base::WeakPtr<NativeWindow>& native_window,
|
||||||
}
|
}
|
||||||
|
|
||||||
// If no preferred item is specified, try to show all of the menu items.
|
// If no preferred item is specified, try to show all of the menu items.
|
||||||
if (!positioning_item) {
|
if (!item) {
|
||||||
CGFloat windowBottom = CGRectGetMinY([view window].frame);
|
CGFloat windowBottom = CGRectGetMinY([view window].frame);
|
||||||
CGFloat lowestMenuPoint = windowBottom + position.y - [menu size].height;
|
CGFloat lowestMenuPoint = windowBottom + position.y - [menu size].height;
|
||||||
CGFloat screenBottom = CGRectGetMinY([view window].screen.frame);
|
CGFloat screenBottom = CGRectGetMinY([view window].screen.frame);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue