Before, clicking on a link would always jump to the beginning of the linked-to page, even when the link targets a specific point within the page.
I'm not sure if this is the correct fix, since I don't quite understand the meaning of cell_height
and doc_height
etc., but it has worked in all my tests.