Fix for keypad issue
authorHyun Lee <hyunn.lee@samsung.com>
Fri, 12 Apr 2013 11:12:04 +0000 (20:12 +0900)
committerHyun Lee <hyunn.lee@samsung.com>
Fri, 12 Apr 2013 11:12:04 +0000 (20:12 +0900)
Change-Id: I0df70313a2c32e809294882f8574fee3174ad9fa
Signed-off-by: Hyun Lee <hyunn.lee@samsung.com>
src/controls/FWebCtrl_WebImpl.cpp

index d292505..0b58be4 100755 (executable)
@@ -1688,27 +1688,24 @@ OnWebKeypadClosed(void* pUserData, Evas_Object* pView, void* pEventInfo)
        _WebImpl* pImpl = reinterpret_cast< _WebImpl* >(pUserData);
        SysAssertf(pImpl, "Failed to request");
 
-       if (pImpl->IsKeypadVisible())
+       _Form* pFormCore = pImpl->GetParentFormCore(dynamic_cast< _Control* >(&pImpl->GetCore()));
+       if (pFormCore)
        {
-               _Form* pFormCore = pImpl->GetParentFormCore(dynamic_cast< _Control* >(&pImpl->GetCore()));
-               if (pFormCore)
+               if (pFormCore->HasFooter() && pImpl->IsFooterVisible())
                {
-                       if (pFormCore->HasFooter() && pImpl->IsFooterVisible())
-                       {
-                               pImpl->SetFooterVisibleState(false);
-                               pFormCore->SetActionBarsVisible(FORM_ACTION_BAR_FOOTER, true);
-                       }
-
-                       pFormCore->DeflateClientRectHeight(0);
+                       pImpl->SetFooterVisibleState(false);
+                       pFormCore->SetActionBarsVisible(FORM_ACTION_BAR_FOOTER, true);
                }
 
-               if (pImpl->GetWebKeypadEventListener())
-               {
-                       pImpl->GetWebKeypadEventListener()->OnWebKeypadClosed(*dynamic_cast< Web* >(&pImpl->GetPublic()));
-               }
+               pFormCore->DeflateClientRectHeight(0);
+       }
 
-               pImpl->SetKeypadVisibleState(false);
+       if (pImpl->GetWebKeypadEventListener())
+       {
+               pImpl->GetWebKeypadEventListener()->OnWebKeypadClosed(*dynamic_cast< Web* >(&pImpl->GetPublic()));
        }
+
+       pImpl->SetKeypadVisibleState(false);
 }
 
 
@@ -4368,9 +4365,9 @@ _WebImpl::OnFocusLost(const _ControlImpl& source)
 {
        if(IsKeypadVisible() == true)
        {
-               OnWebKeypadClosed(this, null, null);
-
                SetKeypadOpened(true);
+
+               SetKeypadVisibleState(false);
        }
 
        evas_object_focus_set(__pWebCore->GetWebNativeNode(), EINA_FALSE);
@@ -4414,21 +4411,6 @@ _WebImpl::OnChangeLayout(_ControlOrientation orientation)
 {
        _ContainerImpl::OnChangeLayout(orientation);
 
-       if (IsKeypadVisible() == true)
-       {
-               int x = 0;
-               int y = 0;
-               int w = 0;
-               int h = 0;
-               ecore_imf_context_input_panel_geometry_get(ecore_imf_context_add(ecore_imf_context_default_id_get()), &x, &y, &w, &h);
-
-               _Form* pFormCore = GetParentFormCore(dynamic_cast< _Control* >(&this->GetCore()));
-               if (pFormCore)
-               {
-                       pFormCore->DeflateClientRectHeight(h);
-               }
-       }
-
        if (__pColorPicker.get())
        {
                __pColorPicker->ChangeLayout(orientation);