From: hyun lee Date: Wed, 3 Jul 2013 06:48:20 +0000 (+0900) Subject: Fix for text selection issue X-Git-Tag: submit/tizen_2.2/20130714.153306~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f4efbd88df9b29eeec90ae325d8bd77e7834f249;p=framework%2Fosp%2Fweb.git Fix for text selection issue Change-Id: I5ec6ebe63c0846c4466fc66877c882e6abf3b51a Signed-off-by: hyun lee --- diff --git a/src/controls/FWebCtrl_Web.cpp b/src/controls/FWebCtrl_Web.cpp old mode 100755 new mode 100644 index 3d4b7fe..4ec2e87 --- a/src/controls/FWebCtrl_Web.cpp +++ b/src/controls/FWebCtrl_Web.cpp @@ -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); } diff --git a/src/controls/FWebCtrl_WebImpl.cpp b/src/controls/FWebCtrl_WebImpl.cpp index d2c6c04..e9daf76 100644 --- a/src/controls/FWebCtrl_WebImpl.cpp +++ b/src/controls/FWebCtrl_WebImpl.cpp @@ -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; }