fix #13220 Scrollspy generates wrong offsets for a page-- recalculate offsets if `scrollheight` changes