electron: Starting devtools with activate: false makes it so that clicking on the main window does not bring it to the front
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for an issue that matches the one I want to file, without success.
Issue Details
- Electron Version: 5.0.6
- Operating System: Windows 10
Expected Behavior
When I open devtools with activate: false, and the devtools appears in front of the main window, I expect that clicking on the main window will focus it and bring it to the front.
Actual Behavior
When doing the above, the main window does not get sent to the front, but it does get focus.
To Reproduce
main.js:
const { app, BrowserWindow } = require('electron')
function createWindow() {
const mainWindow = new BrowserWindow();
mainWindow.webContents.openDevTools({ mode: "detach", activate: false });
}
app.on('ready', createWindow)
Run npm start. Make sure that devtools is at least partially covering the main window. Notice that clicking on the main window that’s in the back does not bring it to the front.
Observations:
- The main window does get focus, and you can successfully open menu items
- Clicking on the devtools and then back to the main window will bring the main window to the front
- You can resize the main window and still observe the issue (resizing doesn’t work around it)
About this issue
- Original URL
- State: open
- Created 7 years ago
- Comments: 29 (4 by maintainers)
bump