Scroll selected element to viewport when user clicks on details.

Implements #1.