Fallback on parent node for scrollheight when parent element is undefined