Preserve scroll position after height reset