use scrollHeight instead of offsetHeight (#11482)