Ensure that pgAdmin should not allow opening external files that are dragged into it. Fixes #6355

This commit is contained in:
Pradip Parkale
2021-04-28 11:59:45 +05:30
committed by Akshay Joshi
parent 718ac02806
commit 9dd1bae3c7
3 changed files with 21 additions and 0 deletions

View File

@@ -97,6 +97,16 @@ define(
that.onCreate.apply(that, [myPanel, $container]);
}
// 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) {
event.stopPropagation();
event.preventDefault();
});
if (that.elContainer) {
myPanel.pgElContainer = $container;
$container.addClass('pg-el-container');