Fix bug where the text input is blurred on open