fix auxclick event (middle click) #1843

This commit is contained in:
Baltazar Gomez 2018-08-01 14:44:01 -06:00 committed by GitHub
parent 0110f1756d
commit 261e3fb410
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
import { app, BrowserWindow, dialog, screen } from 'electron';
import { app, BrowserWindow, dialog, shell, screen } from 'electron';
import isDev from 'electron-is-dev';
import windowStateKeeper from 'electron-window-state';
@ -124,5 +124,10 @@ export default appState => {
window = null;
});
window.webContents.on('new-window', (event, url) => {
event.preventDefault();
shell.openExternal(url);
});
return window;
};