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

Commit

Permalink
fix: disable unhandled dragging interaction on main window
Browse files Browse the repository at this point in the history
This disables dragging interaction on the main window of the application, e.g. when
pulling files from onto the application.

Before this change the entire application was blanked. By preventing the resulting
navigation event this does not happen after this change

related to #177
  • Loading branch information
marionebl authored and lkuechler committed Dec 27, 2017
1 parent 7c7f151 commit 0a0c45b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/electron/electron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ function createWindow(): void {
win = undefined;
});

// Disable navigation on the host window object, triggered by system drag and drop
win.webContents.on('will-navigate', e => {
e.preventDefault();
});

let devToolsInstaller;
try {
devToolsInstaller = require('electron-devtools-installer');
Expand Down

0 comments on commit 0a0c45b

Please sign in to comment.