Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
fix: prevent new windows from user interactions
Browse files Browse the repository at this point in the history
  • Loading branch information
marionebl committed Oct 10, 2018
1 parent f9a7509 commit 6dfe0ab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/electron/create-window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ export async function createWindow(ctx: { port: number }): Promise<ElectronWindo
e.preventDefault();
});

win.webContents.on('new-window', e => {
e.preventDefault();
});

// Install development tools in dev mode
if (electronIsDev) {
require('devtron').install();
Expand Down

0 comments on commit 6dfe0ab

Please sign in to comment.