Merge pull request #14948 from Pldi23/drag&drop_not_work_from_mail

Set 'dropEffect' based on 'effectAllowed' for drag-and-drop in the viewer (issue 14942)
This commit is contained in:
Jonas Jenwald 2022-05-22 15:34:15 +02:00 committed by GitHub
commit 8fcdad022b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2185,7 +2185,8 @@ function webViewerInitialized() {
appConfig.mainContainer.addEventListener("dragover", function (evt) {
evt.preventDefault();
evt.dataTransfer.dropEffect = "move";
evt.dataTransfer.dropEffect =
evt.dataTransfer.effectAllowed === "copy" ? "copy" : "move";
});
appConfig.mainContainer.addEventListener("drop", function (evt) {
evt.preventDefault();