Add back event param

This commit is contained in:
Kevin Sawicki 2016-06-22 09:35:11 -07:00
parent 4e8d4dfda9
commit 50a62429e4

View file

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