Fix searching in presentation mode in Firefox

This PR fixes an issue which cause pages to be scrolled partially out of view when highlighting search results in presentation mode. *Please note that searching is still __only__ possible in the Firefox versions of PDF.js.*

~~__Please note:__ This PR needs parts of #3644 to work, so this is intended as a follow-up of that issue.~~
PR #3644 has been merged, so this should be good to go now.

(Split of from #3593.)