wojtekmaj / react-pdf

Display PDFs in your React app as easily as if they were images.
https://projects.wojtekmaj.pl/react-pdf
MIT License
9.34k stars 882 forks source link

Duplicated Annotation Layer - after update to version 9.0 #1837

Open karinaglf opened 3 months ago

karinaglf commented 3 months ago

Before you start - checklist

Description

After upgrading to react-pdf 9.0.0, we have encountered an issue where some form field inputs seem to be displayed twice. This duplication results in incorrect rendering of these fields. It appears that hidden elements from the Annotation layer are being shown, causing this duplication. Please see the image below for reference.

screen

Steps to reproduce

pdfjs.GlobalWorkerOptions.workerSrc = new URL(
    'pdfjs-dist/legacy/build/pdf.worker.min.mjs',
    import.meta.url,
).toString();

Expected behavior

Actual behavior

Additional information

No response

Environment

TangMichael commented 2 months ago

Updated our app to react-pdf v9.0.0 and I am getting the same issue. In my use case, the text input cannot be clicked as the annotation layer has a DOM element that prevents it from being clicked.

Any solution regarding this?

TadasValaitiz commented 1 month ago

I'm facing the same issue