Use a more stable element focus test.

If this test has to be used more often, I suggest to use a prototype.

This bugfix is based on various SO threads like
  http://stackoverflow.com/questions/18850219/testing-for-focus-an-angularjs-directive