updated scrollHeight to use element's parent scrollheight