Should be clientHeight instead of innerHeight