BrandonKlotz / next-image-trace-loader

Trace images as SVGs as they load.
https://next-image-trace-loader.vercel.app
MIT License
20 stars 4 forks source link

Cannot drag or select full images #1

Closed tddostu closed 3 years ago

tddostu commented 3 years ago

Hello, thanks so much for making this! I was trying to stitch together my own solution for trace-loading images + Next image and stumbled upon this. I like that it's easy to pop in on top of NextJS's image processing selectively.

When dragging or selecting an that has gone through next-image-trace-loader it drags out what appears to be the SVG, not the final image. You also cannot drop the image/SVG anywhere that I tested (to a new tab, to the desktop etc).

To Reproduce Steps to reproduce the behavior:

  1. Go to any image rendered with next-image-trace-loader
  2. Drag the image out and see what it gives you

Expected behavior The final image (not the loader SVG) should be able to be dragged/selected. Screenshots https://user-images.githubusercontent.com/36751136/107604867-1ab95f00-6c7d-11eb-851f-fb8bf383b2c5.mp4

Desktop (please complete the following information):

Smartphone (please complete the following information): N/A

BrandonKlotz commented 3 years ago

Hey thanks for logging this issue and with awesome details! 😄

I think I have a gut feeling of what's going on here. In the DOM I render the SVG traced image after the source image. I am going to test adding the styles of pointer-events: none on the SVG image tonight to see if this resolves this and gives us the expected behavior.

BrandonKlotz commented 3 years ago

@tddostu Thanks again for reporting this 💯 this is resolved now in 1.1.4