Browse Source

fix: bad menu position when no positioning item specified (#28277)

Co-authored-by: Jeremy Rose <[email protected]>
trop[bot] 4 years ago
parent
commit
7487fe91fe
1 changed files with 1 additions and 1 deletions
  1. 1 1
      shell/browser/api/electron_api_menu_mac.mm

+ 1 - 1
shell/browser/api/electron_api_menu_mac.mm

@@ -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);