make the focus jump back to the left if it's required
better support for other browsers
Merge pull request #1531 from ether/fix-for-long-strings

make the focus jump back to the left if it's required