client icon indicating copy to clipboard operation
client copied to clipboard

Open pdf in Firefox, annotations disappear when zooming in/out

Open function2-llx opened this issue 2 years ago • 3 comments

To reproduce

  1. open pdf file (local or remote URL, e.g., https://arxiv.org/pdf/1911.05722.pdf) with Firefox
  2. activate the hypothesis by clicking the bookmark
  3. annotate some text
  4. zoom the page (by holding ctrl and scrolling, or clicking the "+/-" button on the top), then the annotations disappear, though they still exist and are clickable

out

I've tested with via.hypothes.is and Chrome, and both work fine, the annotations disappear when zooming but appear again instantly.

OS: Ubuntu 22.04 Firefox version: 109.0.1 (64-bit)

function2-llx avatar Feb 04 '23 05:02 function2-llx

I can reproduce when using the Hypothesis bookmarklet in Firefox 109.0.1, which uses PDF.js v3.2.47 [feb6f5951] (see console logs). I cannot reproduce in the same browser when accessing the PDF through Via, which is currently using PDF.js v2.14.137.

So it looks like the issue is related to changes in PDF.js.

robertknight avatar Feb 06 '23 13:02 robertknight

Hello, will Hypothesis become compatible with PDF.js of higher versions in the future? It seems non-trivial to use a lower version of PDF.js in Firefox (https://github.com/mozilla/pdf.js/issues/10500).

function2-llx avatar Oct 31 '23 09:10 function2-llx

Hello, will Hypothesis become compatible with PDF.js of higher versions in the future?

Eventually, yes. We have other work that is a higher priority for us at present.

Most annotation of PDFs with Hypothesis is done via the Chrome extension, the proxy service at https://via.hypothes.is or the custom PDF.js viewer at https://github.com/hypothesis/pdf.js-hypothes.is. In all of those cases we control the version of PDF.js that is used, so we make sure it is compatible with the client.

robertknight avatar Oct 31 '23 09:10 robertknight