From: Bowon Ryu Date: Mon, 4 Dec 2023 06:10:05 +0000 (+0900) Subject: [Tizen] Fix key event consumption issue in text field X-Git-Tag: accepted/tizen/7.0/unified/20231205.172626^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=00a2f2df692ffc9d2a2283f3cf5a40ea09edd52b;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git [Tizen] Fix key event consumption issue in text field The keycode for '$' and `RETURN` are the same on a specific device. To avoid this problem, check the key name. Change-Id: I743688b69e10b0bcb83476bbad8616791eebb5ea Signed-off-by: Bowon Ryu --- diff --git a/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp index 3c607be..bd3de4e 100644 --- a/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp @@ -63,6 +63,7 @@ namespace Internal namespace // unnamed namespace { const unsigned int DEFAULT_RENDERING_BACKEND = Dali::Toolkit::DevelText::DEFAULT_RENDERING_BACKEND; +const char* KEY_RETURN_NAME = "Return"; } // unnamed namespace namespace @@ -873,7 +874,7 @@ bool TextField::OnKeyEvent(const KeyEvent& event) return true; } - else if(Dali::DevelKey::DALI_KEY_RETURN == event.GetKeyCode()) + else if(Dali::DevelKey::DALI_KEY_RETURN == event.GetKeyCode() && KEY_RETURN_NAME == event.GetKeyName()) { // Do nothing when enter is comming. return false;