Skip to content

Commit

Permalink
Update dragdrop.js
Browse files Browse the repository at this point in the history
Fixing a problem when u cannot put two images and they are going into two different places for images.
  • Loading branch information
ezt19 committed Sep 23, 2023
1 parent 5ef669d commit fdecf81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion javascript/dragdrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ window.addEventListener('paste', e => {
}

const firstFreeImageField = visibleImageFields
.filter(el => el.querySelector('input[type=file]'))?.[0];
.filter(el => !el.querySelector('img'))?.[0];

dropReplaceImage(
firstFreeImageField ?
Expand Down

0 comments on commit fdecf81

Please sign in to comment.