stephanrauh / ngx-extended-pdf-viewer

A full-blown PDF viewer for Angular 16, 17, and beyond
https://pdfviewer.net
Apache License 2.0
449 stars 167 forks source link

Helper Tag Not Removed on Component Destroy in ngx-extended-pdf-viewer v20.2.0 #2389

Closed moorthyptm closed 2 days ago

moorthyptm commented 4 days ago

I am using ngx-extended-pdf-viewer version 20.2.0. The PDF viewer is attached to a mat dialog. Each time I open the dialog, ngx-extended-pdf-viewer creates a helper tag:

`

` However, when the component is destroyed, this tag is not removed (not properly cleaned up). This isn't a big issue for 3 to 4 clicks, but in my case, I am using a legacy Bootstrap CSS package that overrides:

hidden input[type=file] {
     display: block; 
}

So this issue is clearly visible to me. I request that the temporary code be cleaned up when the component is destroyed.

As a temporary fix, I will override the CSS to hide the helper tag, but we need to ensure that the temporary code is cleaned up when the component is destroyed to prevent memory leaks.

same thing reproduced in the pdfviwer.net [Just switch multiple navigations and check dom] image

Thanks!

Version info

Version of ngx-extended-pdf-viewer: 20.2.0

stephanrauh commented 2 days ago

Your bugfix has landed with version 20.5.1.

Enjoy! Stephan

moorthyptm commented 1 day ago

Thanks @stephanrauh for the quick action