Remove the closed event of Menu
The callback of Menu.popup does more things, and there is actually no request for the closed event.
This commit is contained in:
parent
73d78d345a
commit
46330ac2a9
6 changed files with 1 additions and 50 deletions
|
@ -280,8 +280,7 @@ WebContents.prototype._init = function () {
|
|||
this.on('pepper-context-menu', function (event, params, callback) {
|
||||
// Access Menu via electron.Menu to prevent circular require.
|
||||
const menu = electron.Menu.buildFromTemplate(params.menu)
|
||||
menu.once('closed', callback)
|
||||
menu.popup(event.sender.getOwnerBrowserWindow(), params.x, params.y)
|
||||
menu.popup(event.sender.getOwnerBrowserWindow(), params.x, params.y, callback)
|
||||
})
|
||||
|
||||
// The devtools requests the webContents to reload.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue