Add back event param
authorKevin Sawicki <kevinsawicki@gmail.com>
Wed, 22 Jun 2016 16:35:11 +0000 (09:35 -0700)
committerKevin Sawicki <kevinsawicki@gmail.com>
Wed, 22 Jun 2016 16:35:11 +0000 (09:35 -0700)
lib/browser/api/menu-item.js

index b895cbe..e1ccda4 100644 (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)
     }