dfa1234 / ngx-image-compress

Angular library for uploading and compressing images
https://image-library.app
MIT License
86 stars 36 forks source link

the pop-up window opens twice #110

Open BrunoPorfidio opened 10 months ago

BrunoPorfidio commented 10 months ago

Hello guys, i found a error, when i use the image compress in a input connected a Label, the Pop-up windows opens twices.

<label for="logotipo">
<i class="bi bi-plus-lg"></i>
</label>
<input  (change)="compressFile()" type="file"  name="logotipo"  id="logotipo" 
   accept="image/png, image/jpeg" formControlName="logotipo" [class.is-invalid]="invalidLogo"
   alife-file-to-base64 >

i cannot change the label for a button, because my validation dont work, and if i change the (change) for (click), happens the same.

dfa1234 commented 2 months ago

Maybe we need to make some fix on our side, but meanwhile, a solution for you would be to put the code of you compressFile() function in zone outside angular