Fix zoom multi
Template tests / tests (push) Successful in 1m52s

This commit is contained in:
2026-07-07 13:09:21 -05:00
parent 493f899a11
commit 2929d7d5e4
+4
View File
@@ -156,6 +156,10 @@ function createWindow() {
// with this window's preload bridge. // with this window's preload bridge.
security.installWindowSecurity(mainWindow, 'main'); security.installWindowSecurity(mainWindow, 'main');
mainWindow.webContents.on('before-input-event', (event, input) => { mainWindow.webContents.on('before-input-event', (event, input) => {
// Electron reports both the key-down and key-up as separate
// before-input-event calls; only act on the down edge or every tap
// fires the shortcut twice regardless of the dedupe window below.
if (input.type !== 'keyDown') return;
const kind = zoomShortcutFromInputEvent(input); const kind = zoomShortcutFromInputEvent(input);
if (!kind) return; if (!kind) return;
event.preventDefault(); event.preventDefault();