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
fix: webContents.openDevTools({mode})
not working
#32829
Conversation
4a3a38d
to
fd5f550
Compare
hrm. Chrome manages to open devtools on a particular side without this hack. How does it work in Chrome? |
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.
We should find a better way but this isn't awful
Release Notes Persisted
|
I have automatically backported this PR to "17-x-y", please check out #32945 |
I have automatically backported this PR to "18-x-y", please check out #32946 |
@zcbenz @codebytere, looks like this landing broke |
Thanks for noticing it, I created a PR at #32950. |
Description of Change
Closes #32702.
Electron calls into
UI.DockController.instance().setDockSide(side)
in order to allow users to set the devtools dock position viawebContents.openDevTools({ mode })
. In this DevTools CL the globals which we used to enable this were removed, and so we need to re-expose them to fix this broken functionality. We should look to upstream a more durable approach to allowing us to do this.Tested by adding
mainWindow.webContents.openDevTools({ mode: 'left' })
to the default stock Fiddle and observing that it no longer errors and the devtools docks appropriately to the left-hand side.Checklist
Release Notes
Notes: Fixed an issue where
webContents.openDevTools({ mode })
did not work for certain dock positions.