Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text Selection in Chrome behaves differently in Pdf.js demo and react-pdf #1834

Open
4 tasks done
yuvalyellin opened this issue Jun 24, 2024 · 2 comments
Open
4 tasks done
Labels
bug Something isn't working stale

Comments

@yuvalyellin
Copy link

Before you start - checklist

  • I followed instructions in documentation written for my React-PDF version
  • I have checked if this bug is not already reported
  • I have checked if an issue is not listed in Known issues
  • If I have a problem with PDF rendering, I checked if my PDF renders properly in PDF.js demo

Description

Hi,

I am using this file: https://www.museumoffloridahistory.com/media/1489/short_history_of_florida.pdf

In pdf.js demo the text selection is smooth, but in react-pdf ( I used the create-react-app sample with this file ) , whenever I am over the white area (for example , white spaces between paragraphs) I am getting the old whole text selected bug .

Any ideas on what I can do to align to the behavior of pdf.js?

Thanks,
Yuval

Steps to reproduce

  1. Load file in react-pdf
  2. Select a text
  3. Move mouse (while selecting) over a paragrph end white space
  4. Watch as text selection jumps around

Expected behavior

I would expect the same behavior as in pdf.js (waiting for the mouse to be over a text element to update the selectoin)

Actual behavior

some whole sections of the page are selected without any reason

Additional information

No response

Environment

  • Browser (if applicable): Chrome 126.0.6478.62
  • React-PDF version: 9
  • React version: ^18.2.0",
  • Bundler name and version (if applicable): CRA (I used the create react app sample)
@yuvalyellin yuvalyellin added the bug Something isn't working label Jun 24, 2024
@KHedrick2021
Copy link

also having the same issue and looking for a solution.

Copy link
Contributor

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 14 days.

@github-actions github-actions bot added the stale label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

2 participants