hypothesis / product-backlog

Where new feature ideas and current bugs for the Hypothesis product live
118 stars 7 forks source link

Highlight is not over the selected text #1210

Open dwhly opened 3 years ago

dwhly commented 3 years ago

Bug report form

Steps to reproduce

  1. Go here: https://hyp.is/JpVxqrUDEeudHSeeMuaPOQ/asapbio.org/shared-technology-needs-for-preprints
  2. Ensure that you're using via, NOT the chrome extension

Expected behaviour

"Jessica Polka, Carly Strasser, and Dario Taraborelli" should be highlighted.

Actual behaviour

"rio Taraborelli (2021). Shared technology needs for " is highlighted.

Screenshot 2021-05-18 at 7 55 47 AM

Browser/system information

Version: 1.783.0 User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36 URL: https://asapbio.org/shared-technology-needs-for-preprints Fingerprint: N/A Account: Dan Whaley (acct:dwhly@hypothes.is) Date: Tue May 18 2021 07:21:10 GMT-0700 (Pacific Daylight Time)

dwhly commented 3 years ago

This is a highly visible document from the preprint community, the authors of which have chosen to use Hypothesis. This obv showcases this to a wider group of folks that might choose to also use us.

esanzgar commented 3 years ago

I can reproduce in Safari and Firefox but not in Chrome (using the extension):

image

dwhly commented 3 years ago

Per @mattdricker: Seeing the error in via but not in the extension.

robertknight commented 3 years ago

In Safari I see the issue in Via but not when using the bookmarklet. From stepping through anchoring code for the first annotation (with text quote "positions") in the debugger it looks like anchoring using the range and position is failing. matchQuote finds the correct quote in the page but it seems that when those positions are mapped to a Range the result is not correct. Might be something to do with the JS logic that pywb injects into the page.

Related Slack thread: https://hypothes-is.slack.com/archives/C2BLQDKHA/p1621350131000400