PDF text selection rect can be confusing in Safari
Text selections in VitalSource PDF books can sometimes produce overly-large selection rectangles in Safari that make it hard to discern where the selection ends.
Steps to reproduce:
- Go to http://localhost:3000/document/vitalsource-pdf
- Make a text selection that begins just before "Chapter 2" and ends just after "Production possibilities"
In Chrome, the selection looks like this:
In Safari, the same selection looks like this:
This is most likely related to the first <hypothesis-text-column> element (red background) overlapping with the second (yellow background). The bullet point characters are part of the first column, but the text of the bullet points are part of the second column.
This issue is likely to come up if we try re-using ImageTextLayer in (non-VitalSource) PDFs - https://github.com/hypothesis/client/issues/5023
Is this issue still reproducible in latest Safari versions?