diff --git a/web/pgadmin/browser/static/js/panel.js b/web/pgadmin/browser/static/js/panel.js index c0371b2dc..c9e64132b 100644 --- a/web/pgadmin/browser/static/js/panel.js +++ b/web/pgadmin/browser/static/js/panel.js @@ -98,11 +98,7 @@ define( } // Prevent browser from opening the drag file. - $('.pg-panel-content').bind('dragover', function (event) { - event.stopPropagation(); - event.preventDefault(); - }); - $('.pg-panel-content').bind('drop', function (event) { + $container.bind('dragover drop', function (event) { event.stopPropagation(); event.preventDefault(); }); diff --git a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js index e396fdf7d..7f93c5e83 100644 --- a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js +++ b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js @@ -493,11 +493,7 @@ define('tools.querytool', [ }); // Prevent browser from opening the drag file. - $('#datagrid').bind('dragover', function (event) { - event.stopPropagation(); - event.preventDefault(); - }); - $('#datagrid').bind('drop', function (event) { + $('#datagrid').bind('dragover drop', function (event) { event.stopPropagation(); event.preventDefault(); });