Account for variable height rows when calculating scrollY