Fix a visual bug where horizontal scrollbars range is not correct

This usually happen if the editor was resized while being hidden