mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: bad menu position when no positioning item specified (#28278)
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
This commit is contained in:
@@ -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 (!positioning_item) {
|
||||
if (!item) {
|
||||
CGFloat windowBottom = CGRectGetMinY([view window].frame);
|
||||
CGFloat lowestMenuPoint = windowBottom + position.y - [menu size].height;
|
||||
CGFloat screenBottom = CGRectGetMinY([view window].screen.frame);
|
||||
|
||||
Reference in New Issue
Block a user