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

Right-click may cause exception if there's no text layer #2349

Closed stephanrauh closed 4 weeks ago

stephanrauh commented 4 weeks ago

Starting with pdf.js 4.3, the right-click sometimes causes an exception if there's no text layer.

Steps to reproduce:

Then this error message occurs in the console:


polyfills.cb63d087e4ed7d72.js:1 Uncaught 
TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.
    at document.addEventListener.signal (viewer-4.3.620.min.mjs:21:209584)
    at l.invokeTask (polyfills.cb63d087e4ed7d72.js:1:19395)
    at I.runTask (polyfills.cb63d087e4ed7d72.js:1:14726)
    at _.invokeTask [as invoke] (polyfills.cb63d087e4ed7d72.js:1:20447)
    at w (polyfills.cb63d087e4ed7d72.js:1:4666)
    at j (polyfills.cb63d087e4ed7d72.js:1:5061)
    at HTMLDocument.U (polyfills.cb63d087e4ed7d72.js:1:5225)
```
stephanrauh commented 4 weeks ago

The bug fix has shipped with version 20.5.0-alpha.1.