Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
Default async to true for popup menus; fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
bsclifton committed Feb 27, 2017
1 parent 8e9f984 commit ca5f69b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions atom/browser/api/atom_api_menu_views.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.

#include <memory>

#include "atom/browser/api/atom_api_menu_views.h"

#include "atom/browser/native_window_views.h"
Expand Down
1 change: 1 addition & 0 deletions atom/browser/api/atom_api_menu_views.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_

#include <map>
#include <memory>

#include "atom/browser/api/atom_api_menu.h"
#include "base/memory/weak_ptr.h"
Expand Down
6 changes: 4 additions & 2 deletions lib/browser/api/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Menu.prototype._init = function () {
}

Menu.prototype.popup = function (window, x, y, positioningItem) {
let asyncPopup = false
let asyncPopup = true

// menu.popup(x, y, positioningItem)
if (typeof window !== 'object' || window.constructor !== BrowserWindow) {
Expand All @@ -161,7 +161,9 @@ Menu.prototype.popup = function (window, x, y, positioningItem) {
x = options.x
y = options.y
positioningItem = options.positioningItem
asyncPopup = options.async
asyncPopup = typeof options.async === 'boolean'
? options.async
: true
}

// Default to showing under mouse location.
Expand Down

0 comments on commit ca5f69b

Please sign in to comment.