Specify focused window to execute call
authorKevin Sawicki <kevinsawicki@gmail.com>
Wed, 22 Jun 2016 21:02:31 +0000 (14:02 -0700)
committerKevin Sawicki <kevinsawicki@gmail.com>
Wed, 22 Jun 2016 21:02:31 +0000 (14:02 -0700)
lib/browser/api/menu-item.js

index d2d8e65..2f96fdd 100644 (file)
@@ -54,7 +54,7 @@ const MenuItem = function (options) {
       this.checked = !this.checked
     }
 
-    if (!roles.execute(this.role)) {
+    if (!roles.execute(this.role, focusedWindow)) {
       if (typeof click === 'function') {
         click(this, focusedWindow, event)
       } else if (typeof this.selector === 'string' && process.platform === 'darwin') {