Add back event param
This commit is contained in:
parent
4e8d4dfda9
commit
50a62429e4
1 changed files with 2 additions and 2 deletions
|
@ -75,7 +75,7 @@ const MenuItem = function (options) {
|
|||
this.commandId = ++nextCommandId
|
||||
|
||||
const click = options.click
|
||||
this.click = (focusedWindow) => {
|
||||
this.click = (event, focusedWindow) => {
|
||||
// Manually flip the checked flags when clicked.
|
||||
if (this.type === 'checkbox' || this.type === 'radio') {
|
||||
this.checked = !this.checked
|
||||
|
@ -94,7 +94,7 @@ const MenuItem = function (options) {
|
|||
return webContents != null ? webContents[methodName]() : void 0
|
||||
}
|
||||
} else if (typeof click === 'function') {
|
||||
return click(this, focusedWindow)
|
||||
return click(this, focusedWindow, event)
|
||||
} else if (typeof this.selector === 'string' && process.platform === 'darwin') {
|
||||
return Menu.sendActionToFirstResponder(this.selector)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue