Specify focused window to execute call

This commit is contained in:
Kevin Sawicki 2016-06-22 14:02:31 -07:00
parent 30e3a6ed83
commit c6dc6a8905

View file

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