Fix for text selection issue
[framework/osp/web.git] / src / controls / FWebCtrl_Web.cpp
old mode 100755 (executable)
new mode 100644 (file)
index c126153..4ec2e87
@@ -566,9 +566,12 @@ _Web::GetRelativeCoordinate(FloatPoint absolutePoint)
 Evas_Object*
 _Web::GetWebNativeNode(void)
 {
-       SysTryReturn(NID_WEB_CTRL, __pEflWebkit.get(), null, E_INVALID_STATE, "[%s] Native node is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
+       if (__pEflWebkit.get())
+       {
+               return __pEflWebkit->GetWebEvasObject();
+       }
 
-       return __pEflWebkit->GetWebEvasObject();
+       return null;
 }
 
 
@@ -778,6 +781,14 @@ _Web::OnTouchReleased(const _Control& source, const _TouchInfo& touchInfo)
        {
                SendTouchEventForJavaScript(touchInfo);
 
+               Evas_Object* pView = GetWebNativeNode();
+               _WebImpl* pImpl = reinterpret_cast< _WebImpl* >(evas_object_data_get(pView, WEB_CTRL));
+
+               if (pImpl && pImpl->GetTextFromBlock().GetLength() > 0)
+               {
+                       evas_object_smart_callback_call(pView, "text,selected", NULL);
+               }
+
                return __pGestureHandler->OnTouchReleased(source, touchInfo);
        }