Clear the selection when the selection in invalid.

This happens when the user clicks something not editable.