diff --git a/pd/nw/index.js b/pd/nw/index.js index a7502fc06a43dcacac9b90c4d9b728d348a52a8e..ee164b871ebdef2bc724ad81270e5043dea8240f 100644 --- a/pd/nw/index.js +++ b/pd/nw/index.js @@ -323,6 +323,14 @@ function add_events() { document.getElementById("fileDialog").setAttribute("nwworkingdir", pwd); document.getElementById("fileDialog").setAttribute("accept", Object.keys(pdgui.pd_filetypes).toString()); + + // disable drag and drop for the time being + window.addEventListener("dragover", function (evt) { + evt.preventDefault(); + }, false); + window.addEventListener("drop", function (evt) { + evt.preventDefault(); + }, false); } function nw_close_window(window) { diff --git a/pd/nw/pd_canvas.js b/pd/nw/pd_canvas.js index f43d7f366f8398cf0dcafd10b4aab3f4c19c7aa2..a20d821fdce700dc2d4e66e96491c401cea37963 100644 --- a/pd/nw/pd_canvas.js +++ b/pd/nw/pd_canvas.js @@ -554,6 +554,14 @@ var canvas_events = (function() { canvas_find_focus, false ); + // disable drag and drop for the time being + window.addEventListener("dragover", function (evt) { + evt.preventDefault(); + }, false); + window.addEventListener("drop", function (evt) { + evt.preventDefault(); + }, false); + // Add placeholder text... this all needs to be collected into an // add_events function similiar to the one in index.js document.querySelector("#canvas_find_text").placeholder =