brenoprata10 / ng2-image-viewer

Ng2-Image Viewer for Angular 2+ projects
https://brenoprata10.github.io/ng2-image-viewer/
MIT License
31 stars 60 forks source link

Navigation gets stuck after loading PDF #44

Open tova6659 opened 4 years ago

tova6659 commented 4 years ago

We want to use ng2-image-viewer on our project and test it. During the tests, we saw that after loading a PDF, no other files can be navigated. the console error is:

ImageViewerComponent.html:1 ERROR DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node. at EmulatedEncapsulationDomRenderer2.removeChild (http://localhost:4200/vendor.js:79433:20) at DebugRenderer2.removeChild (http://localhost:4200/vendor.js:76436:23) at ImageViewerComponent.push../node_modules/ng2-image-viewer/ng2-image-viewer.umd.js.ImageViewerComponent.limparCacheElementos (http://localhost:4200/vendor.js:93222:27) at ImageViewerComponent.push../node_modules/ng2-image-viewer/ng2-image-viewer.umd.js.ImageViewerComponent.prepararTrocaImagem (http://localhost:4200/vendor.js:93209:14) at ImageViewerComponent.push../node_modules/ng2-image-viewer/ng2-image-viewer.umd.js.ImageViewerComponent.showImage (http://localhost:4200/vendor.js:93114:14) at ImageViewerComponent.push../node_modules/ng2-image-viewer/ng2-image-viewer.umd.js.ImageViewerComponent.imagemAnterior (http://localhost:4200/vendor.js:93266:14) at Object.eval [as handleEvent] (ng:///ImageViewerModule/ImageViewerComponent.ngfactory.js:357:27) at handleEvent (http://localhost:4200/vendor.js:74622:122) at callWithDebugContext (http://localhost:4200/vendor.js:76241:27) at Object.debugHandleEvent [as handleEvent] (http://localhost:4200/vendor.js:75876:12)

TNX

brenoprata10 commented 4 years ago

Are you modifying something on the component? how are you adding the image/pdf to the array?

tova6659 commented 4 years ago

No, I convert the PDF to Base64 string and put it in the 'image' input