Fixed NPE when using keyboard_enter_text without focus