mirror of https://github.com/axmolengine/axmol.git
fix TextField backspace delete bug
This commit is contained in:
parent
21647839b6
commit
73b38fbc6b
|
@ -647,6 +647,9 @@ void GLView::onGLFWKeyCallback(GLFWwindow *window, int key, int scancode, int ac
|
||||||
EventKeyboard event(g_keyCodeMap[key], GLFW_PRESS == action);
|
EventKeyboard event(g_keyCodeMap[key], GLFW_PRESS == action);
|
||||||
auto dispatcher = Director::getInstance()->getEventDispatcher();
|
auto dispatcher = Director::getInstance()->getEventDispatcher();
|
||||||
dispatcher->dispatchEvent(&event);
|
dispatcher->dispatchEvent(&event);
|
||||||
|
if (key == GLFW_KEY_BACKSPACE && action == GLFW_PRESS) {
|
||||||
|
IMEDispatcher::sharedDispatcher()->dispatchDeleteBackward();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue