diff --git a/src/node/desktop/src/main/context-menu.ts b/src/node/desktop/src/main/context-menu.ts index 4b39eb1fa36..7c5388bd779 100644 --- a/src/node/desktop/src/main/context-menu.ts +++ b/src/node/desktop/src/main/context-menu.ts @@ -115,7 +115,7 @@ function showContextMenuImageTemplate(event: Electron.IpcMainEvent, params: Elec function showContextMenuTextTemplate(event: Electron.IpcMainEvent, params: Electron.ContextMenuParams): ContextMenuItem[] { - // We would like to just alwaus use the already-existing roles for clipboard + // We would like to just always use the already-existing roles for clipboard // actions, but https://www.electronjs.org/docs/api/menu-item has: // // When specifying a role on macOS, label and accelerator are the only options diff --git a/src/node/desktop/src/main/desktop-browser-window.ts b/src/node/desktop/src/main/desktop-browser-window.ts index b9375319de1..081247f960e 100644 --- a/src/node/desktop/src/main/desktop-browser-window.ts +++ b/src/node/desktop/src/main/desktop-browser-window.ts @@ -54,7 +54,7 @@ export class DesktopBrowserWindow extends EventEmitter { private opener?: WebContents, private allowExternalNavigate = false, addApiKeys: string[] = [], - existingWindow?: BrowserWindow + existingWindow?: BrowserWindow // attach to this window instead of creating a new one ) { super(); const apiKeys = [['desktopInfo', ...addApiKeys].join('|')]; @@ -77,16 +77,16 @@ export class DesktopBrowserWindow extends EventEmitter { acceptFirstMouse: true }); - // register context menu (right click) handler - this.window.webContents.on('context-menu', (event, params) => { - showContextMenu(event as IpcMainEvent, params); - }); - // Uncomment to have all windows show dev tools by default // this.window.webContents.openDevTools(); } + // register context menu (right click) handler + this.window.webContents.on('context-menu', (event, params) => { + showContextMenu(event as IpcMainEvent, params); + }); + this.window.webContents.on('before-input-event', (event, input) => { this.keyPressEvent(event, input); });