Skip to content

Commit fdecf81

Browse files
authored
Update dragdrop.js
Fixing a problem when u cannot put two images and they are going into two different places for images.
1 parent 5ef669d commit fdecf81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

javascript/dragdrop.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ window.addEventListener('paste', e => {
119119
}
120120

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

124124
dropReplaceImage(
125125
firstFreeImageField ?

0 commit comments

Comments
 (0)