JosephusPaye / drag-to-download

👇🏾 Drag a link from the browser unto your desktop to download.

Home Page:https://chrome.google.com/webstore/detail/drag-to-download/nlbdfajoolkacbicncknldfoikncjdhb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does not work when an image is dragged

manlymgmt-anthony opened this issue · comments

When an image (ie PDF thumbnail) is used as a link, dragging the thumbnail image trigger's Chrome's default behaviour to extract the thumbnail jpg instead of downloading the link target PDF via the extension.
I assume dragging an image doesn't fire the 'dragstart' event.

Currently it checks that the direct element being dragged is an <a> with href. To support images that are wrapped in a link like you described, it'll have to check if the element being dragged has a parent that is a link.