mirror of
https://github.com/electron/electron.git
synced 2026-01-25 15:28:11 -05:00
Merge pull request #8974 from electron/default-popup-async-value
Default async to false when object is specified
This commit is contained in:
@@ -144,7 +144,7 @@ Menu.prototype._init = function () {
|
||||
}
|
||||
|
||||
Menu.prototype.popup = function (window, x, y, positioningItem) {
|
||||
let asyncPopup = false
|
||||
let asyncPopup
|
||||
|
||||
// menu.popup(x, y, positioningItem)
|
||||
if (window != null && (typeof window !== 'object' || window.constructor !== BrowserWindow)) {
|
||||
@@ -174,6 +174,9 @@ Menu.prototype.popup = function (window, x, y, positioningItem) {
|
||||
// Default to not highlighting any item.
|
||||
if (typeof positioningItem !== 'number') positioningItem = -1
|
||||
|
||||
// Default to synchronous for backwards compatibility.
|
||||
if (typeof asyncPopup !== 'boolean') asyncPopup = false
|
||||
|
||||
this.popupAt(window, x, y, positioningItem, asyncPopup)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user