From 3aaea7d60f3e269579ba6d52eaeb5520482481f5 Mon Sep 17 00:00:00 2001 From: satindergrewal Date: Thu, 21 Dec 2017 03:27:18 +1300 Subject: [PATCH] drag and drop view of any file to app window is prevented to open in app --- gui/js/simpledexactions.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gui/js/simpledexactions.js b/gui/js/simpledexactions.js index 83b302b..91e998a 100644 --- a/gui/js/simpledexactions.js +++ b/gui/js/simpledexactions.js @@ -21,6 +21,18 @@ $(window).resize(function() { }) $(document).ready(function() { + document.addEventListener('drop', function(e) { + e.preventDefault(); + e.stopPropagation(); + }); + document.addEventListener('dragover', function(e) { + e.preventDefault(); + e.stopPropagation(); + }); + webview.addEventListener('dragover', function(e) { + e.preventDefault(); + }); + $('.loginbody').css('height',$(window).height()) var mmstatus = ShepherdIPC({"command":"mmstatus"}); if (mmstatus !== 'closed') {