ngx-gallery icon indicating copy to clipboard operation
ngx-gallery copied to clipboard

Close icon in lightbox container being rerendered all the time due to bug in template

Open daelmaak opened this issue 5 years ago • 1 comments

What is the expected behavior?

Close icon doesn't get rerendered all the time so that it can be clicked.

What is the current behavior?

Due to [innerHTML]="sanitizer.bypassSecurityTrustHtml(closeIcon)" in the lightbox.component.ts, if change detection runs often enough, it causes the close icon to be rerendered all the time and prevents it effectively from being clicked -> the lightbox doesn't get closed.

What are the steps to reproduce?

https://stackblitz.com/edit/ngx-gallery-imageviewer-k2e3qu

  1. Open the full screen lightbox
  2. Try to close it with the cross close-icon
  3. It doesn't get closed

Which versions are you using for the following packages?

Angular: 8.2.11 Angular CDK: 8.2.3 Angular CLI: 8.3.9 Typescript: 3.4.5 Gallery: 4.0.3

daelmaak avatar Nov 15 '19 14:11 daelmaak

The problem is obviously caused by ngx-imageviewer, even the navigation is very slow. I think this issue should be opened on that project!

MurhafSousli avatar Mar 16 '20 01:03 MurhafSousli