I **think** the only thing that sets a special starting-point for find-in-page is the **selection state**, not the scroll position. So e.g. if you visit https://en.wikipedia.org/wiki/Mozilla and scroll halfway down, and then do find-in-page for "Mozilla", then Firefox snaps you back up to the very top of the document (to the first match). Whereas if you repeat that process, **and click-and-drag to select some text in the middle of the article** before you start your find-in-page operation, then Firefox starts the find operation from that point (the selected text). Maybe PDF.js is creating a selection of some sort during its find-in-page operation, which is triggering this find-in-page behavior?
Bug 1904970 Comment 8 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
I **think** the only thing that sets a special starting-point for find-in-page is the **selection state**, not the scroll position. So e.g. if you visit https://en.wikipedia.org/wiki/Mozilla and scroll halfway down, and then do find-in-page for "Mozilla", then Firefox (and Chrome) snaps you back up to the very top of the document (to the first match). Whereas: if you repeat that process, **and click-and-drag to select some text in the middle of the article** before you start your find-in-page operation, then Firefox starts the find operation from that point (the start of the selected text). Maybe PDF.js is creating a selection of some sort during its find-in-page operation, which is triggering this find-in-page behavior?
I **think** the only thing that sets a special starting-point for find-in-page is the **selection state**, not the scroll position. So e.g. if you visit https://en.wikipedia.org/wiki/Mozilla and scroll halfway down, and then do find-in-page for "Mozilla", then Firefox (and Chrome) snaps you back up to the very top of the document (to the first match). Whereas: if you repeat that process, **and click-and-drag to select some text in the middle of the article** before you start your find-in-page operation, then Firefox starts the find operation from that point (the start of the selected text). Maybe PDF.js is creating a selection of some sort during its find-in-page operation, which is triggering this special find-in-page behavior where it skips ahead to a nondefault starting point?