未验证 提交 96fa81bb 编写于 作者: A Alex Dima

Forward arguments when click is invoked via `makeContextAwareClickHandler` (fixes #115026)

上级 4bd2d367
......@@ -678,8 +678,8 @@ export class Menubar {
return new MenuItem(this.withKeybinding(commandId, options));
}
private makeContextAwareClickHandler(click: () => void, contextSpecificHandlers: IMenuItemClickHandler): () => void {
return () => {
private makeContextAwareClickHandler(click: (menuItem: MenuItem, win: BrowserWindow, event: KeyboardEvent) => void, contextSpecificHandlers: IMenuItemClickHandler): (menuItem: MenuItem, win: BrowserWindow | undefined, event: KeyboardEvent) => void {
return (menuItem: MenuItem, win: BrowserWindow | undefined, event: KeyboardEvent) => {
// No Active Window
const activeWindow = BrowserWindow.getFocusedWindow();
......@@ -694,7 +694,7 @@ export class Menubar {
}
// Finally execute command in Window
click();
click(menuItem, win || activeWindow, event);
};
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册