hypothesis / client

The Hypothesis web-based annotation client.
Other
642 stars 197 forks source link

Mismatch between selection and highlighted text in PDF.js v2.11.106 #3674

Closed robertknight closed 3 years ago

robertknight commented 3 years ago

When testing an upgrade to the latest version of PDF.js (v2.11.106) in the browser extension I encountered an issue where the highlights created for an annotation no longer match the originally selected text.

PDF js v2 11 text selection issue

In the above screenshot, the annotation quote matches the text I originally selected, but the highlight does not.

The PDF I'm using for testing here is https://cogcomp.seas.upenn.edu/papers/RRDA11.pdf.

I also observed an issue where there was quite noticeable latency between clicking the "Annotate" button for the first time in a session and the annotation being created. The latency seems to be reduced when creating subsequent annotations. In a long book this could be confusing for the user as they may think that the "Annotate" button did not work. Likely related to this issue, I notice that the bucket bar is very laggy in updating compared to the production client.

robertknight commented 3 years ago

Aside from the issue shown above, there is also a more subtle problem with the way PDF anchoring currently falls back to quote-based anchoring in the event that the position selector no longer matches. See https://github.com/hypothesis/client/issues/3705.

robertknight commented 3 years ago

Closing this as https://github.com/hypothesis/client/issues/3705 has now been resolved.