From: Ayush Date: Mon, 15 Jul 2013 15:49:54 +0000 (+0530) Subject: Fix for Focus Ui in Input mode X-Git-Tag: submit/tizen_2.2/20130716.173726~9^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=35b9058a6c120406b4790b2842887061f1c4f4c2;p=framework%2Fosp%2Fuifw.git Fix for Focus Ui in Input mode Change-Id: I9ed22a78ad735c89158b6f3de24e4a37c563b0df Signed-off-by: Ayush --- diff --git a/src/ui/controls/FUiCtrl_SearchBar.cpp b/src/ui/controls/FUiCtrl_SearchBar.cpp index 74a3a34..f6b48fb 100644 --- a/src/ui/controls/FUiCtrl_SearchBar.cpp +++ b/src/ui/controls/FUiCtrl_SearchBar.cpp @@ -79,6 +79,7 @@ _SearchBar::_SearchBar(void) , __isButtonTextChangedByApp(false) , __contentVisibilitySetByApp(true) , __isInFocusMode(false) + , __isFocusUiInitialized(false) , __keypadAction(CORE_KEYPAD_ACTION_SEARCH) , __pBackgroundBitmap(null) , __backgroundColor(Color()) @@ -1831,6 +1832,7 @@ _SearchBar::OnFocusLost(const _Control &source) void _SearchBar::OnDrawFocus(void) { + __isFocusUiInitialized = true; __isInFocusMode = true; __pEdit->SetSearchFieldFocus(true); _Control::OnDrawFocus(); @@ -1873,6 +1875,14 @@ _SearchBar::OnPreviewKeyPressed(const _Control &source, const _KeyInfo &keyInfo) _KeyCode keyCode = keyInfo.GetKeyCode(); + if (keyCode == _KEY_TAB && GetMode() == SEARCH_BAR_MODE_INPUT && __isFocusUiInitialized == false) + { + __isInFocusMode = true; + __pEdit->SetSearchFieldFocus(true); + __isFocusUiInitialized = true; + return false; + } + switch (keyCode) { case _KEY_UP: diff --git a/src/ui/inc/FUiCtrl_SearchBar.h b/src/ui/inc/FUiCtrl_SearchBar.h index 4c66b7d..0b16b79 100644 --- a/src/ui/inc/FUiCtrl_SearchBar.h +++ b/src/ui/inc/FUiCtrl_SearchBar.h @@ -308,6 +308,7 @@ private: bool __isButtonTextChangedByApp; bool __contentVisibilitySetByApp; bool __isInFocusMode; + bool __isFocusUiInitialized; CoreKeypadAction __keypadAction;