mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Set 'dropEffect' based on 'effectAllowed' for drag-and-drop in the viewer (issue 14942). See https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/effectAllowed
This commit is contained in:
parent
96b125fb72
commit
55da67e9aa
1 changed files with 2 additions and 1 deletions
|
@ -2187,7 +2187,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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue