-
Notifications
You must be signed in to change notification settings - Fork 300
Workaround for devtools keyboard shortcuts not working on OSX #2390
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2390 +/- ##
======================================
Coverage 38.2% 38.2%
======================================
Files 300 300
Lines 12518 12518
Branches 1647 1647
======================================
Hits 4782 4782
Misses 7481 7481
Partials 255 255 Continue to review full report at Codecov.
|
// Workaround for cut/copy/paste/close keybindings not working in devtools window on OSX | ||
if (process.platform === "darwin") { | ||
currentWindow.webContents.on("devtools-opened", () => { | ||
currentWindow.webContents.devToolsWebContents.executeJavaScript(` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really cool, didn't know this was possible! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, but it doesn't work for "quit" CMD+Q will not close window if focus is on the devtools. It used to in previous version of electron.
Just tested it out - works great @psxpaul ! Nice find on the workaround - major quality of life improvement 💯 Merging the PR now - thanks for the contribution! |
* fix: typo in translation file * chore: notify only on panel unlocked * chore: update dependencies * chore: use props * chore: better window size control * feat: allow setting classname for avatars * 9.0.3 * chore: append in-process-gpu switch * chore: append --in-process-gpu flag on windows only * chore: move codes * chore: remove in-process-gpu flag * fix: preload script of kan-game-window not executed * chore: run handleWebviewMount() on webContents attached * feat: polyfill devtool key bindings on macOS ref: electron/electron#11998 creadits: onivim/oni#2390 * chore: update dependencies * fix: linting * chore: eslint update & config reformat * chore: enfore quote usage * fix: css error in edge cases * docs: update issue template add instruction for network acceleration services * chore: update item improvement plugin description * fix: audio static resources path * chore: update electron * fix: background color - transparent color is no longer required - GPU status window background * Capture screenshots with Canvas and capture stream.
* fix: typo in translation file * chore: notify only on panel unlocked * chore: update dependencies * chore: use props * chore: better window size control * feat: allow setting classname for avatars * 9.0.3 * chore: append in-process-gpu switch * chore: append --in-process-gpu flag on windows only * chore: move codes * chore: remove in-process-gpu flag * fix: preload script of kan-game-window not executed * chore: run handleWebviewMount() on webContents attached * feat: polyfill devtool key bindings on macOS ref: electron/electron#11998 creadits: onivim/oni#2390 * chore: update dependencies * fix: linting * chore: eslint update & config reformat * chore: enfore quote usage * fix: css error in edge cases * docs: update issue template add instruction for network acceleration services * chore: update item improvement plugin description * fix: audio static resources path * chore: update electron * fix: background color - transparent color is no longer required - GPU status window background * Capture screenshots with Canvas and capture stream. * Reload Flash -> Reload game also changed gameReloadFlash to gameReload in views/services/utils. the old function name is kept for compatibility but should be removed after few future releases. * revert zh-TW * fix i18n for zh-CN and zh-TW
* fix: typo in translation file * chore: notify only on panel unlocked * chore: update dependencies * chore: use props * chore: better window size control * feat: allow setting classname for avatars * 9.0.3 * chore: append in-process-gpu switch * chore: append --in-process-gpu flag on windows only * chore: move codes * chore: remove in-process-gpu flag * fix: preload script of kan-game-window not executed * chore: run handleWebviewMount() on webContents attached * feat: polyfill devtool key bindings on macOS ref: electron/electron#11998 creadits: onivim/oni#2390 * chore: update dependencies * fix: linting * chore: eslint update & config reformat * chore: enfore quote usage * fix: css error in edge cases * docs: update issue template add instruction for network acceleration services * chore: update item improvement plugin description * fix: audio static resources path * chore: update electron * fix: background color - transparent color is no longer required - GPU status window background * Capture screenshots with Canvas and capture stream. * Reload Flash -> Reload game also changed gameReloadFlash to gameReload in views/services/utils. the old function name is kept for compatibility but should be removed after few future releases. * revert zh-TW * fix i18n for zh-CN and zh-TW
Fixes #2347 using the workaround suggested in the Electron bug