Question: is there a way to disable auto focus of electron app after "npm run dev"
See original GitHub issueHello, I’ve got tired of getting constantly switched to electron app window after I run npm run dev or make some changes in source code. Is there some way to disable this behaviour?
System
- Node version: 8.1.0
- NPM version: 5.0.3
- vue-cli version: 2.8.2
- Operating System: Mac OS 10.12.5
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
node.js - Disable reload via keyboard shortcut electron app
This seems to be still an issue. There's no way to catch the CMD+R (or CTRL+R or F5) shortcut even in bundled app...
Read more >app | Electron
If the user pressed Cmd + Q , or the developer called app.quit() , Electron will first try to close all the windows...
Read more >How to Setup Simple Hot-Reload on an Electron App With No ...
Now, if you run your Electron app ( npm start ) and open the developer tools window in your app (click View ->...
Read more >Build an Electron App in Under 60 Minutes - YouTube
In this video we will build a desktop application using Electron. js which allows us to build desktop apps using only JavaScript.
Read more >How to build an Electron app using create-react-app ... - Medium
create-react-app makes certain assumptions about a typical React setup. If these assumptions aren't for you, there is an option to eject an application...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@imomaliev
You can simply change the
BrowserWindowAPI used tomainWindow.showInactive()and setshowtofalsein the constructor options.https://electron.atom.io/docs/api/browser-window/#winshowinactive
src/main/index.js
Hope this helps.
Actually with
showInactive()it does get visible and does not grab the focus.