mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure that pgAdmin should not allow opening external files that are dragged into it. Fixes #6355
This commit is contained in:
committed by
Akshay Joshi
parent
718ac02806
commit
9dd1bae3c7
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user