restore dnd protection for URLs to open

This commit is contained in:
Benjamin Pasero
2016-06-16 08:26:19 +02:00
parent 9f2c1b7ddf
commit e0e732895d

View File

@@ -63,9 +63,11 @@ export class ElectronWindow {
});
}
// Prevent a dropped file from opening as application
window.document.body.addEventListener(DOM.EventType.DRAG_OVER, (e: DragEvent) => {
DOM.EventHelper.stop(e);
// Prevent a dropped link from opening within
[DOM.EventType.DRAG_OVER, DOM.EventType.DROP].forEach(event => {
window.document.body.addEventListener(event, (e: DragEvent) => {
DOM.EventHelper.stop(e);
});
});
// Handle window.open() calls