fix: Windows zoom shortcuts and keep chat preview file after workspace tab#982
fix: Windows zoom shortcuts and keep chat preview file after workspace tab#982
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b87dc6c694
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
|
||
| export function registerZoomShortcuts(win: BrowserWindow): void { | ||
| win.webContents.on('before-input-event', (event, input) => { | ||
| const action = getZoomShortcutAction(input); |
There was a problem hiding this comment.
Gate zoom handling to keyDown events
When a user presses a zoom accelerator, Electron's before-input-event is delivered for both keydown and keyup, but this handler maps every input event to an action. For shortcuts such as Ctrl+-/Ctrl+=, the keyup still carries the modifier state, so the zoom level can change twice for one keystroke (for example 0 → -2 instead of 0 → -1). Check input.type === 'keyDown' before applying the zoom action.
Useful? React with 👍 / 👎.
No description provided.