Shadow when highlighting
Akaban opened this issue · comments
Description
When I highlight any text on the rendered PDF the text is duplicated all over the highlighting, making it unreadable. Since this does not happen on online demos of react-pdf that I can find on the net I expected the problem to be related to versions. But I used many differents versions of react-pdf and pdf.js and nothing seem to fix the problem.
This may be related to upstream.
I tried to change versions of react-pdf-highlighter and differents versions of PdfWorker as well and nothing seemed to fix the problem.
Same problem happens in Google Chrome and Mozilla Firefox.
Steps to reproduce
Steps to reproduce the behavior:
- Load a PDF using react-pdf-highglighter
- Highlight some text
- Text is duplicated all over the highlighting
Expected behavior
I didn't expect text to be duplicated
Additional information
Environment
- Browser (if applicable): google-chrome 88.0.4324.150-1 and firefox 85.0.2-1
- React-PDF-highlighter version: 3.4.0
- React version : 17.0.1
Thanks for any help btw :) Would be greatly appreciated !
And the library is awesome
Try adding following style to PdfHighlighter.css
.textLayer ::selection{
color: transparent;
}