Fix N_SE-42846
authorTaejun <tj.twt.park@samsung.com>
Tue, 25 Jun 2013 05:07:02 +0000 (14:07 +0900)
committerTaejun <tj.twt.park@samsung.com>
Tue, 25 Jun 2013 05:07:02 +0000 (14:07 +0900)
Change-Id: Icdcad41065ecb9fb01c89481cc807d839ed0e600

src/ui/controls/FUiCtrl_Edit.cpp
src/ui/controls/FUiCtrl_EditPresenter.cpp
src/ui/inc/FUiCtrl_EditPresenter.h

index a3f563d..96b5d59 100755 (executable)
@@ -2143,23 +2143,8 @@ _Edit::OnAncestorEnableStateChanged(const _Control& control)
 
        if (!enableState)
        {
-               if (_pEditPresenter->IsCopyPasteManagerExist())
-               {
-                       _pEditPresenter->InitializeCopyPasteManager();
-               }
-
-               if (__internalFocus)
-               {
-                       if (_pEditPresenter->IsKeypadEnabled())
-                       {
-                               _pEditPresenter->HideKeypad(true);
-                       }
-                       else
-                       {
-                               SetFocused(false);
-                       }
-                       __internalFocus = false;
-               }
+               _pEditPresenter->ChangeToUnbindState();
+               __internalFocus = false;
        }
 
        Invalidate();
@@ -2175,23 +2160,8 @@ _Edit::OnAncestorVisibleStateChanged(const _Control& control)
 
        if (!visibleState)
        {
-               if (_pEditPresenter->IsCopyPasteManagerExist())
-               {
-                       _pEditPresenter->InitializeCopyPasteManager();
-               }
-
-               if (__internalFocus)
-               {
-                       if (_pEditPresenter->IsKeypadEnabled())
-                       {
-                               _pEditPresenter->HideKeypad(true);
-                       }
-                       else
-                       {
-                               SetFocused(false);
-                       }
-                       __internalFocus = false;
-               }
+               _pEditPresenter->ChangeToUnbindState();
+               __internalFocus = false;
        }
 
        Invalidate();
index 544ff9c..ba2a07f 100755 (executable)
@@ -6234,11 +6234,37 @@ _EditPresenter::OnFrameDeactivated(const _Frame& source)
 void
 _EditPresenter::OnFrameMinimized(const _Frame& source)
 {
+       return;
 }
 
 void
 _EditPresenter::OnFrameRestored(const _Frame& source)
 {
+       return;
+}
+
+void
+_EditPresenter::ChangeToUnbindState(void)
+{
+       if (IsCopyPasteManagerExist())
+       {
+               InitializeCopyPasteManager();
+       }
+
+       if (__pEdit->IsInternalFocused())
+       {
+               if (IsKeypadEnabled())
+               {
+                       HideKeypad(true);
+               }
+               else
+               {
+                       __pEdit->SetFocused(false);
+                       __isInputConnectionBound = false;//forcely set, OnFocusLost callback can be missed in special condition.
+               }
+       }
+
+       return;
 }
 
 bool
index 6504935..34e5cc1 100755 (executable)
@@ -141,6 +141,7 @@ public:
        virtual result Draw(Tizen::Graphics::Canvas& canvas);
        virtual result DrawCursor(Tizen::Graphics::Canvas& canvas, Tizen::Graphics::FloatRectangle& cursorRect, bool isCursorOpaque);
        virtual result DrawScrollBar(void);
+       virtual void ChangeToUnbindState(void);
        virtual bool OnFocusGained(void);
        virtual bool OnFocusLost(void);