Fix IE8 failures in front end tests.

* Only focus an element if it is visible and enabled
* Blur previously focused elements before focusing new element.

fixes #3385
Merge pull request #3392 from mozilla/issue_3385_ie8_failures

Issue 3385 ie8 failures