Merge pull request #1844 from lbryio/auxclick

Fix middle-click open link event
This commit is contained in:
Sean Yesmunt 2018-08-01 21:52:18 -04:00 committed by GitHub
commit 2b1a6ce3e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
### Fixed
* **Wallet -> Get Credits** page now shows correct ShapeShift status when it's avialable ([#1836](https://github.com/lbryio/lbry-desktop/issue))
* Fix middle click link error ([#1843](https://github.com/lbryio/lbry-desktop/issues/1843)}
## [0.23.0] - 2018-07-25

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;
};