use window instead of document height in case of hidden content