kolkov / ngx-gallery

A simple responsive native gallery component for Angular 8+.
https://ngx-gallery.kolkov.ru/
MIT License
115 stars 56 forks source link

previewDownload button does not download content if the preview is an image #29

Open arturmikheyankou opened 4 years ago

arturmikheyankou commented 4 years ago

Hi there.

I encountered one situation when I can't download an image from the preview using the previewDownload button. Trying to download sends me to a new tab with this image. I can assume that the fact is that the download attribute of a link that contains an image does not contain a link to the image. Could you take a look at this problem, I think it's a quick task for you.

Example:

<a _ngcontent-c34="" aria-hidden="true" class="ngx-gallery-icon ng-star-inserted" download="" href="https://...response-content-type=image%2Fjpeg">
   <i _ngcontent-c34="" class="ngx-gallery-icon-content fa fa-arrow-circle-down"></i>
</a>
Снимок экрана 2020-04-30 в 23 24 25

There's a note in the docs for this attribute: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a

Best regards, Artur