Skip to content

Commit

Permalink
Work around Electron bug with DevTools focus
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Mar 22, 2018
1 parent 1685899 commit f1fec83
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/menu.js
Expand Up @@ -64,13 +64,15 @@ const debugMenu = {
{
label: 'Log Container State',
async click() {
await runJS('__UNSTATED__.logState()');
const [win] = BrowserWindow.getAllWindows();
await runJS('__UNSTATED__.logState()', win);
},
},
{
label: 'Toggle Logging on State Changes',
async click() {
await runJS('__UNSTATED__.logStateChanges = !__UNSTATED__.logStateChanges');
const [win] = BrowserWindow.getAllWindows();
await runJS('__UNSTATED__.logStateChanges = !__UNSTATED__.logStateChanges', win);
},
},
{
Expand Down

0 comments on commit f1fec83

Please sign in to comment.