When a span is selected, center it in the viewport.