Fix for text selection issue
authorhyun lee <hyunn.lee@samsung.com>
Wed, 3 Jul 2013 06:48:20 +0000 (15:48 +0900)
committerhyun lee <hyunn.lee@samsung.com>
Wed, 3 Jul 2013 06:48:20 +0000 (15:48 +0900)
Change-Id: I5ec6ebe63c0846c4466fc66877c882e6abf3b51a
Signed-off-by: hyun lee <hyunn.lee@samsung.com>
src/controls/FWebCtrl_Web.cpp [changed mode: 0755->0644]
src/controls/FWebCtrl_WebImpl.cpp

old mode 100755 (executable)
new mode 100644 (file)
index 3d4b7fe..4ec2e87
@@ -781,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);
        }
 
index d2c6c04..e9daf76 100644 (file)
@@ -3700,7 +3700,7 @@ _WebImpl::SetEventListenerCallback(void) const
                evas_object_smart_callback_add(pWebNativeNode, "touchmove,handled", OnWebPreventDefaultTriggered, this);
                evas_object_smart_callback_add(pWebNativeNode, "icon,received", OnFaviconReceived, this);
 
-               evas_object_smart_callback_add(pWebNativeNode, "text,style,state", OnWebPageBlockSelected, this);
+               evas_object_smart_callback_add(pWebNativeNode, "text,selected", OnWebPageBlockSelected, this);
                evas_object_smart_callback_add(pWebNativeNode, "frame,rendered", OnWebPageBlockSelectedByOrientation, this);
 
                ewk_view_open_panel_callback_set(pWebNativeNode, OnSelectUploadFile, const_cast< _WebImpl* >(this));
@@ -3782,7 +3782,7 @@ _WebImpl::RemoveEventListenerCallback(void) const
                evas_object_smart_callback_del(pWebNativeNode, "touchmove,handled", OnWebPreventDefaultTriggered);
                evas_object_smart_callback_del(pWebNativeNode, "icon,received", OnFaviconReceived);
 
-               evas_object_smart_callback_del(pWebNativeNode, "text,style,state", OnWebPageBlockSelected);
+               evas_object_smart_callback_del(pWebNativeNode, "text,selected", OnWebPageBlockSelected);
                evas_object_smart_callback_del(pWebNativeNode, "frame,rendered", OnWebPageBlockSelectedByOrientation);
 
                ewk_view_open_panel_callback_set(null, null, null);
@@ -3870,6 +3870,8 @@ _WebImpl::SetBlockSelectionPosition(const FloatPoint& startPoint)
 
        SysTryReturnResult(NID_WEB_CTRL, GetTextFromBlock().GetLength() > 0, E_INVALID_ARG, "Failed to set text selection up.");
 
+       evas_object_smart_callback_call(pView, "text,selected", NULL);
+
        return E_SUCCESS;
 }