Clamp scroll at min/max elements if they exist.