fix(GUI): open DevTools in detach mode (#1014)

We were previously using the `undocked` mode, which would open DevTools
in a seaprate window, however the user was still allows to pick a new
mode, causing DevTools to be shown inside the main application and
completely ruining the UI.

The `detach` mode in the other hand, completely prevents user from
putting DevTools in the main application, therefore allowing no way to
make the UI look broken.

See: http://electron.atom.io/docs/api/web-contents/
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
This commit is contained in:
Juan Cruz Viotti 2017-01-11 16:14:03 -04:00 committed by GitHub
parent 2c64f0da23
commit a14506f016

View File

@ -65,7 +65,7 @@ electron.app.on('ready', () => {
mainWindow.on('focus', () => {
electron.globalShortcut.register('CmdOrCtrl+Alt+I', () => {
mainWindow.webContents.openDevTools({
mode: 'undocked'
mode: 'detach'
});
});
});