From 73b38fbc6b06b0df159b225c708bf390596176f7 Mon Sep 17 00:00:00 2001 From: andyque Date: Fri, 18 Jul 2014 18:13:17 +0800 Subject: [PATCH] fix TextField backspace delete bug --- cocos/platform/desktop/CCGLView.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cocos/platform/desktop/CCGLView.cpp b/cocos/platform/desktop/CCGLView.cpp index 4c4fbd7072..f703f8cfbd 100644 --- a/cocos/platform/desktop/CCGLView.cpp +++ b/cocos/platform/desktop/CCGLView.cpp @@ -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(); + } } }