Avoid setting focus if input element is not displayed. Fixes error in IE.

Not sure what compiler you're using. I used:

```shell
uglifyjs --vmc
```