fix auxclick event (middle click) #1843
This commit is contained in:
parent
0110f1756d
commit
261e3fb410
1 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue