fix TextField backspace delete bug

This commit is contained in:
andyque 2014-07-18 18:13:17 +08:00
parent 21647839b6
commit 73b38fbc6b
1 changed files with 3 additions and 0 deletions

View File

@ -647,6 +647,9 @@ void GLView::onGLFWKeyCallback(GLFWwindow *window, int key, int scancode, int ac
EventKeyboard event(g_keyCodeMap[key], GLFW_PRESS == action);
auto dispatcher = Director::getInstance()->getEventDispatcher();
dispatcher->dispatchEvent(&event);
if (key == GLFW_KEY_BACKSPACE && action == GLFW_PRESS) {
IMEDispatcher::sharedDispatcher()->dispatchDeleteBackward();
}
}
}