stephanrauh / ngx-extended-pdf-viewer

A full-blown PDF viewer for Angular 16, 17, and beyond
https://pdfviewer.net
Apache License 2.0
449 stars 167 forks source link

Highlight all is not highlighing the correct results when there are multiple matches in the same line. #2356

Closed Hypercubed closed 3 weeks ago

Hypercubed commented 3 weeks ago

Describe the bug Highlight all is not highlighing the correct results when there are multiple matches in the same line.

Version info 20.2.0

Demo PDF file Can be seen in the demo (https://pdfviewer.net/extended-pdf-viewer/simple) when searching for "the":

image

By comparing to pdfjs demo I think the folllowing CSS is missing:

  .textLayer .highlight.appended {
    position: initial;
  }

Adding that manually in chrome devtools seams to fix it:

image
stephanrauh commented 3 weeks ago

Yes, you're right. It was a single closing curly brace at the wrong position. Thanks for pointing that out, and special kudos for providing the missing CSS rule. It allowed me to find the bug a lot faster!

stephanrauh commented 3 weeks ago

Your bugfix has landed with version 20.5.0-alpha.2.

Enjoy! Stephan