Fix issue tabbing between inputs

Bug: Click on an input, type something, click on another input; focus is left on
the first input.

I added a quick check so that `elem.focus()` will not be called for blur events.