Only focus on the input box if no text is selected

Closes #38.