fixed wrong calculated element height and absolute position if reference
is window