Changed method for calculating the window height

In scroll pagination, the previous method miscalculated the window height which resulted in loading every single object to be paginated without reaching the scroll margin