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';
@ -123,6 +123,11 @@ export default appState => {
window.webContents.on('crashed', () => {
window = null;
});
window.webContents.on('new-window', (event, url) => {
event.preventDefault();
shell.openExternal(url);
});
return window;
};