Update dragdrop.js

Fixing a problem when u cannot put two images and they are going into two different places for images.
This commit is contained in:
ezt19 2023-09-23 20:41:28 +00:00 committed by GitHub
parent 5ef669de08
commit fdecf813b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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 ?