fixes #703 IE 9 frame bug with hasfocus binding

Since the original author didn't make a pull request, I made one with the original code