Skip to content

Commit

Permalink
Merge pull request adobe#5313 from adobe/rlim/no-drop-on-modal
Browse files Browse the repository at this point in the history
Don't allow drag-and-drop of files/folders when a modal dialog is showing.
  • Loading branch information
JeffryBooher committed Oct 4, 2013
2 parents b577c41 + 15db0a4 commit ac84a6e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/brackets.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,9 @@ define(function (require, exports, module) {
if (event.originalEvent.dataTransfer.files) {
event.stopPropagation();
event.preventDefault();
if (DragAndDrop.isValidDrop(event.originalEvent.dataTransfer.items)) {
// Don't allow drag-and-drop of files/folders when a modal dialog is showing.
if ($(".modal.instance").length === 0 &&
DragAndDrop.isValidDrop(event.originalEvent.dataTransfer.items)) {
dropEffect = "copy";
}
event.originalEvent.dataTransfer.dropEffect = dropEffect;
Expand Down

0 comments on commit ac84a6e

Please sign in to comment.