diff --git a/cocos/2d/CCTextFieldTTF.cpp b/cocos/2d/CCTextFieldTTF.cpp index 98b0f54411..591d62fb20 100644 --- a/cocos/2d/CCTextFieldTTF.cpp +++ b/cocos/2d/CCTextFieldTTF.cpp @@ -195,7 +195,6 @@ void TextFieldTTF::insertText(const char * text, size_t len) if (len > 0) { -#if (CC_TARGET_PLATFORM != CC_PLATFORM_WP8 && CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) if (_delegate && _delegate->onTextFieldInsertText(this, insert.c_str(), len)) { // delegate doesn't want to insert text @@ -206,15 +205,6 @@ void TextFieldTTF::insertText(const char * text, size_t len) std::string sText(_inputText); sText.append(insert); setString(sText); -#else - size_t existlen = _inputText.length(); - if (_delegate && _delegate->onTextFieldInsertText(this, insert.c_str() + existlen, len - existlen)) - { - // delegate doesn't want to insert text - return; - } - setString(insert); -#endif } if ((int)insert.npos == pos) {