Move height setting out of updateScrollBars

Issue #2321