New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BrowserWindow.fromWebContents returns undefined for windows created using window.open #21608
Comments
I wonder if this will be fixed by this PR |
Thank you for taking the time to report this issue and helping to make Electron better. The version of Electron you reported this on has been superseded by newer releases. If you're still experiencing this issue in Electron 6.x.y or later, please add a comment specifying the version you're testing with and any other new information that a maintainer trying to reproduce the issue should know. I'm setting the Thanks in advance! Your help is appreciated. |
This is still an issue in Electron 8. |
Still a problem in Electron 10.1.2 |
Here's a bugbot-compatible gist: https://gist.github.com/decc0f7190ce719279b5f792711c7e6c |
Fixed with #33257. The Sorry it took so long to get to this! At least we fixed it eventually 😅 |
Preflight Checklist
Issue Details
Expected Behavior
I expect that calling
BrowserWindow.fromWebContents(win.webContents)
returnswin
.Actual Behavior
The API returns
undefined
.To Reproduce
Run
npm start
and open a window from devtools (e.g.window.open("https://google.com")
). Notice thatfromWebContents
can't find the browser window for the new window.The text was updated successfully, but these errors were encountered: