fix a keyboard focus bug:
keyboard will loose focus when recovering from minimized state.
Merge pull request #1554 from zhangzl2013/keyboard-focus

fix a keyboard focus bug.