Select previous content when clicking the search box.

Fixes bug 2717.