modly icon indicating copy to clipboard operation
modly copied to clipboard

Drag-and-drop images from Windows Explorer blocked

Open Ricotta12345 opened this issue 2 months ago • 3 comments

Describe the bug

When trying to drag and drop image file from local folder in Windows Explorer to image area in Generate tab, block sign (reg circle with diagonal line) appears when cover file above image area, nothing happens when drops. Open file dialog by click works as usual. Dev console don't show any messages during the whole drag-n-drop process. If I manually replace event listeners for 'dragover' and 'drop' events with "preventDefault()" via dev console, then block sign is disappears. Similar bug was described in #19 https://github.com/lightningpixel/modly/issues/19 and marked as fixed, but I Guthub don't allow me to reopen it, also my issue looks as different bug (because even no dropped image in the slot shows and block sign presented).

Steps to reproduce

  1. Open Modly with by launch.bat without admin privileges.
  2. Open any workflow with "Image" node.
  3. Open Generation tab and select this workflow.
  4. Open Windows Explorer.
  5. Drag image file by mouse (LMB hold) from local folder to image area in Generate tab.
  6. Drop image in the image area (release LMB).
  7. Open dev console by Ctrl+Shift+I
  8. Enter window.addEventListener('dragover', e => e.preventDefault()); in console
  9. Enter window.addEventListener('drop', e => e.preventDefault()); in console
  10. Repeat steps 5 and 6, see the difference (no block sign anymore)

Modly version

0.4.2

Operating system

Windows 10 21H2

Screenshots & logs

Image

Confirmation

  • [x] I have searched existing issues and this has not been reported yet.
  • [x] I can reproduce this on the latest version of Modly.

Ricotta12345 avatar Sep 13 '26 15:09 Ricotta12345

/assign

Yi-111-a avatar Sep 25 '26 13:09 Yi-111-a

✅ Assigned to @Yi-111-a. Comment /unassign if you can no longer work on this. Open a PR that includes Closes #344 in its description when you're ready for review.

github-actions[bot] avatar Sep 25 '26 13:09 github-actions[bot]

This should be fixed in v0.4.3: the image area in the Generate panel now handles dragover and drop, so dropping a file from Windows Explorer loads it. cc @Yi-111-a, since you'd self-assigned this issue: it's already handled, sorry for the overlap.

If the block cursor still appears with v0.4.3, feel free to reopen this issue.

Lorchie avatar Oct 09 '26 13:10 Lorchie