From 5f4fd20b0626d00c82f61163502812f8347a1b20 Mon Sep 17 00:00:00 2001 From: WenhaiLin Date: Tue, 14 Apr 2015 18:04:35 +0800 Subject: [PATCH] TextFieldTTFDefaultTest: Fixed can't take input from the keyboard. --- tests/cpp-tests/Classes/TextInputTest/TextInputTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/cpp-tests/Classes/TextInputTest/TextInputTest.cpp b/tests/cpp-tests/Classes/TextInputTest/TextInputTest.cpp index a4f9f81216..3903f88355 100644 --- a/tests/cpp-tests/Classes/TextInputTest/TextInputTest.cpp +++ b/tests/cpp-tests/Classes/TextInputTest/TextInputTest.cpp @@ -107,10 +107,10 @@ void KeyboardNotificationLayer::onTouchEnded(Touch *touch, Event *event) // decide the trackNode is clicked. Rect rect; - auto point = convertTouchToNodeSpaceAR(touch); + auto point = _trackNode->convertTouchToNodeSpace(touch); CCLOG("KeyboardNotificationLayer:clickedAt(%f,%f)", point.x, point.y); - rect = getRect(_trackNode); + rect.size = _trackNode->getContentSize(); CCLOG("KeyboardNotificationLayer:TrackNode at(origin:%f,%f, size:%f,%f)", rect.origin.x, rect.origin.y, rect.size.width, rect.size.height);