fix focus functions
Merge pull request #7247 from andyque/fixFocus

fix focus functions